TinyMCE 4 disable html cleanup

How to disable automatic HTML cleanup in TinyMCE 4.x When I copy text from WORD, TinyMCE deletes styles

+6
source share
2 answers

You will need to confront this problem in different ways, because tinymce will clear the content no matter what.

Take a look at the tinymce paste_preprocess configuration parameter.

With this parameter, you can define a function in which you can change the content you want to paste as you need. It may also be useful for debugging purposes.

Another thing, you will need to define the styles as valid using the valid_elements parameter.

0
source
tinyMCE.init({ // ... cleanup : false, verify_html : false }); 
-1
source

Source: https://habr.com/ru/post/959290/


All Articles