How can I disable the automatic cleaning of HTML code in TinyMCE 4.x When I copy text from WORD, TinyMCE removes styles
How can I disable the automatic cleaning of HTML code in TinyMCE 4.x When I copy text from WORD, TinyMCE removes styles
You will need to oppose this problem differtly because tinymce will cleanup the content no matter what.
Have a look at the tinymce config parameter paste_preprocess.
Using this param you can define a function in which you are able to modify the content to be inserted as you need to. This can be helpfull for debugging purposes too.
The other thing is you will need to define styles as valid using your valid_elements setting.