Use FCKeditor2.3.2 configuration in PHP, read the use of FCKeditor2.3.2 configuration in PHP, download FCKeditor2.3.2, and decompress it to FCKeditor. 1. delete unnecessary files to save space. All files starting with _, such as _ samples, _ testcases, and some unused. asp,. jsp, and. cfm files are killed. 2. modify fckc
Download FCKeditor2.3.2 and decompress it to FCKeditor.
1. delete unnecessary files to save space. All files starting with _, such as _ samples, _ testcases, and some unused. asp,. jsp, and. cfm files are killed.
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 skin
FCKConfig. TabSpaces = 1; // whether the tab is valid
FCKConfig. ToolbarStartExpanded = true; // you can edit the toolbar to see the toolbar.
FCKConfig. FontNames = '; _ GB2312; Arial; Comic Sans MS; Courier New; Tahoma; Times New Roman; Verdana '; // add Chinese fonts
3. modify FCKeditor \ editor \ css \ fck_editorarea.css
Set default font and size
Body, td
{
Font-family: Arial, Verdana, Sans-Serif;
Font-size: 14px;
}
4. file upload settings
Modify fckconfig. js
Var _ FileBrowserLanguage = 'php'; // asp | aspx | cfm | lasso | perl | php
Var _ QuickUploadLanguage = 'php'; // asp | aspx | cfm | lasso | php
Modify fckeditor \ editor \ filemanager \ browser \ default \ connectors \ php
$ Config ['enabled'] = true;
$ Config ['userfilespath'] = '/UserFiles/'; // you can specify the folder to be uploaded.
Modify fckeditor \ editor \ filemanager \ upload \ php
$ Config ['enabled'] = true;
$ Config ['usefiletype'] = true;
$ Config ['userfilespath'] = '/UserFiles/'; // same as above
5. when introducing the online editor, you only need
Include ("fckeditor/fckeditor. php ");
$ OFCKeditor = new FCKeditor ('fckeditor1'); // instantiate
$ OFCKeditor-> BasePath = 'fckeditor/'; // The path must be the same as the introduced path above. Otherwise, an error is returned: the fckeditor.html page cannot be found.
// $ OFCKeditor-> Value = '';
$ OFCKeditor-> Width = '000000 ';
$ OFCKeditor-> Height = '20140901 ';
$ 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.