Ruslan Osmanov
Ruslan Osmanov

Reputation: 21492

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.

Upvotes: 3

Views: 5299

Answers (1)

Thariama
Thariama

Reputation: 50832

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

Upvotes: 1

Related Questions