开发者

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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜