tinymce和列表项的问题 [英] Problem with tinymce and list-items

查看:104
本文介绍了tinymce和列表项的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用bbcodeplugin和列表项时遇到问题.虽然列表可以按照我的意愿作为bbcode进行保护,但是在重新打开和编辑文本时,tinymce向列表中添加了额外的标记,因此

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> 

成为

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

因此,每个<li>项目都用一个附加的<ul>包裹,我想防止这种情况.

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

我怎么可能排除所有列表项被tinymce-javascript修改?

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

这个问题似乎与在插入代码时添加BR的天性"有关,在我的研究中我已经看到了好几次了.因为不仅ul标签是由tinymce添加的,而且br标签也是由br的添加的.

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?

推荐答案

您应该在init上添加参数.

You should add the parameter on init.

apply_source_formatting:false

apply_source_formatting : false

这将防止对源进行任何预格式化.

This will prevent any preformatting of the source.

这篇关于tinymce和列表项的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆