Problem with tinymce and list-items

限于喜欢 提交于 2019-12-08 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.



来源:https://stackoverflow.com/questions/6096506/problem-with-tinymce-and-list-items

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!