views:

32

answers:

2

Greetings,

I want to know if it is possible 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

A: 

Try:

tinyMCE.init({
    ...
    cleanup : false
});
Blair McMillan
Thanks for the quick reply but that does not work.
ian
this does not work, because this issue is browser related!
Thariama
A: 

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!

Thariama