Download FCKeditor2.3.2 and extract it to FCKeditor.
1. First delete unnecessary files to save space. Get rid of all files starting with _ such as _samples, _testcases and some unused .asp, .jsp, and .cfm files.
2. Modify fckconfig.js
FCKConfig.AutoDetectLanguage = true;//Whether to automatically detect the language
FCKConfig.DefaultLanguage = 'zh-cn' ;//Set the language
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;//Set the skin
FCKConfig.TabSpaces = 1;//Is tab valid?
FCKConfig.ToolbarStartExpanded = true;//Whether the editing toolbar appears, it will not appear until you click "Expand Toolbar"
FCKConfig.FontNames = '宋体;黑体;official script;楷体_GB2312;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;//Add Chinese font
3. Modify FCKeditoreditorcssfck_editorarea.css
Set default font and size
body, td
{
font-family: Arial, Verdana, Sans-Serif;
font-size: 14px;
}
4. About file upload settings
Modify fckconfig.js
var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
modify fckeditoreditorfilemanagerbrowserdefaultconnectorsphp
$Config['Enabled'] = true ;
$Config['UserFilesPath'] = '/UserFiles/' ;//Set the upload folder, you can specify it yourself
Modify fckeditoreditorfilemanageruploadphp
$Config['Enabled'] = true ;
$Config['UseFileType'] = true ;
$Config['UserFilesPath'] = '/UserFiles/' ;//Same as above
5. When introducing an online editor, just
<?php
include("fckeditor/fckeditor.php");
$oFCKeditor = new FCKeditor('FCKeditor1') ;//instantiation
$oFCKeditor->BasePath = 'fckeditor/';//This path must be consistent with the above import path, otherwise an error will be reported: fckeditor.html page cannot be found
//$oFCKeditor->Value = '';
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '300' ;
$oFCKeditor->Create() ;
?>
JS uses alert(FCKeditorAPI.GetInstance('FCKeditor1').GetXHTML(true)) to get the value of FCKeditor1;
PHP uses $_POST['FCKeditor1'] to get the value of FCKeditor1.