-->

Problem with tinymce and list-items

2019-06-16 07:15发布

问题:

I am having a problem with using the bbcodeplugin and list-items. While the lists are being safed as bbcode as i want it, when reopening and editing the text, tinymce adds additional markup to lists, so that something like

<ul>
<li>one</li>
</ul> 

becomes

<ul>
<ul><li>one</li></ul>
</ul>

So each <li> item is being wrapped with an additional <ul> which I would like to prevent.

How could I possibly exclude all list-items from being modified by the tinymce-javascript?


This issue seems related to the "tinymce adding BR when inserting code" thing, which I now saw several times during my research. because not only the ul tags are added by tinymce, but also br's.

Please, can someone give me any hint?

回答1:

You should add the parameter on init.

apply_source_formatting : false

This will prevent any preformatting of the source.