Tinymce或rich:editor如何添加中文字体

最近在使用Richfaces,当应用rich:editor标签时,发现没有中文字体,由于rich:editor使用的Tinymce,所以只要能够将
Tinymce变成支持中文字体就可以了。

将richfaces的jar解压缩后搜索tinymce,终于找到

richfaces-ui-3.3.3.Final.jar\org\richfaces\renderkit\html\scripts\tiny_mce\advanced文件夹下有
editor_template.js和editor_template_src.js两个文件,将其中的theme_advanced_fonts : "Andale Mono=andale mono,times;修改成theme_advanced_fonts : "\u5b8b\u4f53=\u5b8b\u4f53;\u6977\u4f53=\u6977\u4f53\u005f\u0067\u0062\u0032\u0033\u0031\u0032;Andale Mono=andale mono,times;
这里注意,我们将汉字编程unicode字符串。



原文地址:https://www.cnblogs.com/liuzhengdao/p/2097163.html