TinyMCE adds closing div
Greetings,
I want to know if it is po开发者_运维知识库ssible to stop tinyMCE from adding closing divs to the text.
For example if I enter this text:
<div id="content">
<div id="section-content">
<h3>Our Work</h3>
It then becomes this:
<div id="content">
<div id="section-content">
<h3>Our Work</h3>
</div>
</div>
I do not want those 2 closing divs that are added on to the end.
I tried setting verify_html : false but no luck.
FCK Editor does the same thing so is it possible to do this with that editor as well?
Is this possible?
Thanks, -Ian
Try:
tinyMCE.init({
...
cleanup : false
});
The problem is browser related. What you want the editor to contain is not valid html. Because of this the browser automatically completes your opening divs (to get valid html; it is not TinyMCE's fault). As far as i know, this browser behaviour cannot be changed unfortunately!
精彩评论