别安在对ecshop二次开发中发现后台的编辑器没有字体样式,于是找出如下的解决办法:
1,、在fckconfig找到此行增加中文字体样式:
代码如下 | 复制代码 |
FCKConfig.FontNames = '宋体;黑体;隶书;楷体_GB2312;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ; |
2、在fck_editorarea.css中添加字体
代码如下 | 复制代码 |
body, td { font-family: 宋体,黑体,隶书,楷体_GB2312,Arial, Verdana, sans-serif; font-size: 12px; } |
我现在开发的ecshop项目中编辑器用的是Normal所有在Normal中增加FontNames配置项
代码如下 | 复制代码 |
FCKConfig.ToolbarSets["Normal"] = [ ['Cut','Copy','Paste','PasteText','PasteWord','-','Undo','Redo','-','Find','Replace','-','RemoveFormat'], ['Link','Unlink','-','Image','Flash','UpFileBtn','Table'], ['FitWindow','-','Source'], '/', ['FontFormat','FontSize','FontName'], ['Bold','Italic','Underline'], ['OrderedList','UnorderedList','-','Outdent','Indent'], ['JustifyLeft','JustifyCenter','JustifyRight'], ['TextColor','BGColor'] ] ; |
刷新一下前台看看吧OK了!编辑器增加字体完美解决!
时间: 2024-11-26 11:05:54