本文介绍了如何替换< b>与< strong>在TinyMCE for Plone中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在TinyMCE中将粗体标签替换为强标签.如何使用Products.TinyMCE在Plone中实现?
I would like to replace bold tag, , with strong tag, in TinyMCE. How to do it in Plone using Products.TinyMCE?
我阅读了TinyMCE文档, http://www.tinymce.com/wiki.php /Configuration:valid_elements .以下是在TinyMCE中的操作方法:
I read TinyMCE document, http://www.tinymce.com/wiki.php/Configuration:valid_elements. Below is how to do it in TinyMCE:
tinyMCE.init({
...
valid_elements : "strong/b"
});
谢谢.
推荐答案
您可以使用tinymce配置进行此操作:
You may do this using the tinymce configuration:
tinyMCE.init({
...
extended_valid_elements : "strong/b",
....
// Override internal formats
formats: {
bold : {inline : 'strong' }
},
...
});
如果您已使用b标签将编辑器内容保存在数据库中,则可能需要在服务器端用强标签替换这些标签.
In case you have editor content already saved in the database with b-tags it might be needed to replace those tags on serverside with strong-tags.
这篇关于如何替换< b>与< strong>在TinyMCE for Plone中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!