且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何替换< b>与< strong>在TinyMCE for Plone中

更新时间:2023-02-19 17:04:06

您可以使用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.