TinyMCE 4 disable cleanup html

10,559

Solution 1

tinyMCE.init({
    // ...
    cleanup : false,
    verify_html : false
});

Solution 2

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 : '*[*]',
});
Share:
10,559

Related videos on Youtube

Bugaloo
Author by

Bugaloo

Updated on July 08, 2022

Comments

  • Bugaloo
    Bugaloo almost 2 years

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

  • Nathan B
    Nathan B over 6 years
    What's the replacement of cleanup in tinymce 4?
  • Mo Sadeghipour
    Mo Sadeghipour almost 3 years
    The link to paste preprocess is broken.
  • Thariama
    Thariama almost 3 years
    i adjusted the link