Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I turn off TinyMCE's HTML validation?

This is my configuration. I have

verify_html : false

there. But, for instance, the following code:

<ul>
    <h3>h3</h3>
    <li>el1</li>
    <li>el2</li>
</ul>

is converted to:

<h3>h3</h3>
<ul>
    <li>el1</li>
    <li>el2</li>
</ul>

It's TinyMCE 3.5.6. cleanup option is deprecated. So I have no idea how to turn it off.

I know it is weird that h3 is there under ul. But some people have a lot of side effects with such kind of cleanup.

like image 311
Ruslan Osmanov Avatar asked Mar 24 '26 04:03

Ruslan Osmanov


1 Answers

You might not be able to disable validation. But you can define how tinymce will treat html tags. Here is a setting which will keep the h3 where you want it to be, but you need to configure that h3-tags may be children of ul-tags:

http://fiddle.tinymce.com/mfcaab

like image 85
Thariama Avatar answered Mar 26 '26 13:03

Thariama



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!