Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TinyMCE 4 disable cleanup html

How can I disable the automatic cleaning of HTML code in TinyMCE 4.x When I copy text from WORD, TinyMCE removes styles

like image 271
Bugaloo Avatar asked Dec 03 '13 23:12

Bugaloo


2 Answers

This might not fix all your problem but this allowed me to be able to use all html tags and attributes, so it might be a step in right direction.

tinyMCE.init({
    // ...
    valid_elements : '*[*]',
});

Edit :

This worked better for me:

tinyMCE.init({
    // ...
    extended_valid_elements : '*[*]',
});
like image 163
chickens Avatar answered Nov 05 '22 03:11

chickens


tinyMCE.init({
    // ...
    cleanup : false,
    verify_html : false
});
like image 39
bagonyi Avatar answered Nov 05 '22 03:11

bagonyi