stfalcon / TinymceBundle

Bundle for connecting TinyMCE (WYSIWYG editor) to your Symfony2 project
259 stars 154 forks source link

Paste some tags when copying/pasting from Word #236

Open rimoi opened 5 years ago

rimoi commented 5 years ago

Hi,

When I want to paste only some tags when pasting text from Word(Microsoft office or Libre Office)

I use paste_word_valid_elements: 'i,em' as mentioned in the docs :

parameters:
  tinymce_css_path: '/js/tinymce/main.css'

stfalcon_tinymce:
  selector: '.tinymce'
  base_url: 'https://my-website.com/'
  language: '%locale%'
  include_jquery: true
  tinymce_jquery: true
  theme:
    admin:
      plugins:
      - 'autoresize table media image code link'
      - 'searchreplace paste directionality fullscreen'
      - 'noneditable visualchars nonbreaking'
      toolbar: 'bold italic underline | hr | styleselect removeformat | bullist numlist | outdent indent blockquote | link unlink | image media | code'
      autoresize_min_height: 300px
      width: 100%
      paste_word_valid_elements: 'i,em'  # here
      paste_enable_default_filters: false
      menubar: false
      content_css: '%tinymce_css_path%'
      browser_spellcheck: true
      entity_encoding: raw
      convert_urls: false

but it does not filter other tags (bold, ...)!

thanks rimoi