1.添加字体等,配置fckeditor/fckconfig.js:
//对fckeditor的修改
FCKConfig.AutoDetectLanguage = true ;//是否自动检测语言
FCKConfig.DefaultLanguage = 'zh-cn' ;//设置语言
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;//设置皮肤
FCKConfig.TabSpaces = 1 ;//tab是否有效
FCKConfig.ToolbarStartExpanded = true ;//编辑工具条是否出现,等点“展开工具栏”时才出现
FCKConfig.FontNames = '宋体;黑体;隶书;楷体_GB2312;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;//添加中文字体
2.修改fckeditor/editor/filemanager/connectors/php/config.php:
// authenticated users can access this file or use some kind of session checking.
$Config['Enabled'] = true ;
// Path to user files relative to the document root.
$Config['UserFilesPath'] = "/VoteSolution/uploadfiles/";
3.使用:
//引入FCKEditor
require_once("../fckeditor/fckeditor_php5.php");
$fckEditor = new FCKEditor("content");
$fckEditor->BasePath = "../fckeditor/";
$fckEditor->Height = 300;
$fckEditor->create();