1首先刪除不必要的文件節(jié)省空間。凡是以_開頭的文件如_samples,_testcases和一些用不到的.asp、.jsp、.cfm文件統(tǒng)統(tǒng)干掉。
2修改fckconfig.js
FCKConfig.AutoDetectLanguage = true ;//是否自動(dòng)檢測(cè)語(yǔ)言
FCKConfig.DefaultLanguage = 'zh-cn' ;//設(shè)置語(yǔ)言
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;//設(shè)置皮膚
FCKConfig.TabSpaces = 1 ;//tab是否有效
FCKConfig.ToolbarStartExpanded = true ;//編輯工具條是否出現(xiàn),等點(diǎn)“展開工具欄”時(shí)才出現(xiàn)
FCKConfig.FontNames = '宋體;黑體;隸書;楷體_GB2312;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;//添加中文字體
修改FCKeditor\editor\CSS\fck_editorarea.css
設(shè)置默認(rèn)字體及大小
body, td
{
font-family: Arial, Verdana, Sans-Serif;
font-size: 14px;
}
3關(guān)于文件上傳的設(shè)置
修改fckconfig.js
var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
修改fckeditor\editor\filemanager\browser\default\connectors\php
$Config['Enabled'] = true ;
$Config['UserFilesPath'] = '/UserFiles/' ;//設(shè)置上傳的文件夾,可自己指定
修改fckeditor\editor\filemanager\upload\php
$Config['Enabled'] = true ;
$Config['UseFileType'] = true ;
$Config['UserFilesPath'] = '/UserFiles/' ;//同上要一樣
4引入在線編輯器時(shí)只需
include("fckeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('FCKeditor1') ;//實(shí)例化
$oFCKeditor->BasePath = 'fckeditor/';//這個(gè)路徑一定要和上面那個(gè)引入路徑一致,否則會(huì)報(bào)錯(cuò):找不到fckeditor.html頁(yè)面
//$oFCKeditor->Value = '' ;
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '300' ;
$oFCKeditor->Create() ;
?>
JS用alert( FCKeditorAPI.GetInstance('FCKeditor1').GetXHTML( true ))得到FCKeditor1的值;
PHP用$_POST['FCKeditor1']得到FCKeditor1的值。
深圳北大青鳥嘉華校區(qū)