How to disable TinyMCE HTML validation?

This is my configuration. I have

verify_html : false 

there. But, for example, the following code:

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

converted to:

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

This is TinyMCE 3.5.6 . The cleanup option is deprecated. So I have no idea how to disable it.

I know that it is strange that h3 is under ul . But some people have many side effects with such a cleaning.

+4
source share
1 answer

You may not be able to disable validation. But you can determine how tinymce will handle html tags. Here is a tweak that will contain h3 wherever you want, but you need to tweak so that h3 -tags can be children of ul -tags:

http://fiddle.tinymce.com/mfcaab

+1
source

Source: https://habr.com/ru/post/1434760/


All Articles