1
有谁知道如何允许在TinyMCE中使用自定义的大写标签?看起来,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>
和<习俗被保留。
没有人知道任何解决方法吗?
谢谢!
不能你只使用小写标签? – Thariama
不,这是传统数据,所有标签都是自定义的,并且是大写字母。这是否意味着TinyMCE无法实现? – His
您可以将它们转换为编辑器初始化的小写字母。我不知道其他方式(但可能有一个) – Thariama