我正在使用 tinymce 3.5.5 。我有valid_elements/valid_children的以下配置
valid_elements: "@[id|class|title|style|onmouseover]," +
"a[name|href|target|title|alt]," +
"#p,blockquote,-ol,-ul,-li,br,img[src|height|width],-sub,-sup,-b,-i,-u," +
"-span[data-mce-type],hr",
valid_children: "body[p|ol|ul]" +
",p[a|span|b|i|u|sup|sub|img|hr|#text]" +
",span[p|a|b|i|u|sup|sub|img|#text]" +
",a[span|b|i|u|sup|sub|img|#text]" +
",b[span|a|i|u|sup|sub|img|#text]" +
",i[span|a|b|u|sup|sub|img|#text]" +
",sup[span|a|i|b|u|sub|img|#text]" +
",sub[span|a|i|b|u|sup|img|#text]" +
",li[span|a|b|i|u|sup|sub|img|ol|ul|#text]" +
",ol[li]" +
",ul[li]",
编辑器初始化之前我的文本区域的内容:
<textarea name="content">
<p>
<ul>
<li>list_elem</li>
</ul>
</p>
</textarea>
编辑器初始化后的内容:
<p> </p>
<ul>
<li>list_elem</li>
</ul>
<p> </p>
Tinymce 会从段落中删除列表,即使配置应该使其有效。
我为此创建了一个 tinymce 小提琴:http: //fiddle.tinymce.com/7ndaab/3 任何帮助表示赞赏。
为了允许列表作为段落的子级,我需要定义/设置什么?