Reputation: 165
How can i set the tinyMCE editor in wp_editor to not modify/replace the html tags of the initial content ?
I'm loading html content with < b > tags (i know that they are deprecated but i need them) and the tinyMCE editor is replacing them.
I tried several things but with no success. I'm getting a little frustrated. I need help.
What i need is that the editor do not change the loaded html content.
Sorry for my bad english! It's not my native language.
Thanks in advance !
Upvotes: 2
Views: 2387
Reputation: 117
just change the attributes to
valid_children : "+a[div|h1|h2|h3|h4|h5|h6|p|#text]", (defines which html elements are valid + valid attributes)
valid_elements : '*[*]', (defines which combinations of parent and child elements are valid)
Upvotes: 0
Reputation: 50840
Looks like tinymce stripps some html tags out, which tinymce does not recognize as "valid". You will need to set your tinymce config to keep those html elements (make them valid).
There are the following tinymce settings for this:
Upvotes: 1