有谁知道如何允许在 TinyMCE 中使用自定义大写标签?TinyMCE 似乎不喜欢大写标签,即使它们已被声明为有效。这是我的 TinyMCE 配置:
tinyMCE.init({
mode: "specific_textareas",
theme: "advanced",
language: "en",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_statusbar_location: "bottom",
theme_advanced_buttons1: "bold,italic,|,sub,sup,|,charmap,|,table,|,code",
theme_advanced_path: false,
theme_advanced_resizing: true,
plugins: "fullscreen,paste,table",
paste_auto_cleanup_on_paste : true,
relative_urls: false,
width: "300",
height: "300",
theme_advanced_resizing_min_height : "10",
force_br_newlines : true,
force_p_newlines : false,
forced_root_block : '',
entity_encoding: "raw",
valid_elements : "B/strong,I/em,SUP/sup,SUB/sub",
extended_valid_elements: "CUSTOM"
})
输入类似的东西
<CUSTOM>this is a custom tag</CUSTOM>
不起作用,因为 <CUSTOM> 被剥离。
如果我将初始化脚本更改为extended_valid_elements: "custom"
,那么它工作正常 - 我可以输入
<custom>this is a custom tag</custom>
并且 <custom 被保留。
没有人知道任何解决方法吗?
谢谢!