【发布时间】:2014-12-21 19:16:59
【问题描述】:
我目前正在从客户的 CMS 安装中删除 html 的 TinyMCE (v=3.5.8)。在旧版本中有 cleanup:false 和 cleanup_on_startup 但 3.4+ 已弃用。但是,我很难解决这种行为。首先是它弄乱的代码:
之前:
<td><p align="center">
<strong><span style="color: #336600; font-family: georgia,times new roman,times,serif; font-size: x-large;">
Text<br>Text<br>Text<br>Text
</span></strong>
</p></td>
点击进入表格单元格后
<td>
<strong><span style="color: #336600; font-family: georgia,times new roman,times,serif; font-size: x-large;">
Text<br>Text<br>Text<br>Text
</span></strong>
</td>
所以问题是,为什么下面的 init-params 不停止这种行为?
// Skin options
skin : "o2k7",
skin_variant : "silver",
// custom params from attribute tinyparams
verify_html:false,
fix_table_elements:false,
schema:"html4",
valid_children: "+body[style],+td[p],+tr[p],+th[p],+tbody[p],+table[p]"
据我了解,删除我的段落标签的是验证子规则的过程。我还使用了带有完整 xhtml 规则集的 valid_elements http://www.tinymce.com/wiki.php/Configuration3x:valid_elements
有人知道这里发生了什么吗?如有任何提示,我将不胜感激。
【问题讨论】: