Use FCKeditor2.3.2 in PHP. FCKeditor2.3.2 the online editor is very easy to use and supports file upload. This afternoon, baidu finally finished the solution. Download FCKeditor2.3.2 and decompress it to FCKeditor. 1. delete unnecessary FCKeditor2.3.2 online editor, which is very easy to use and supports file upload. This afternoon, baidu finally finished the solution. 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
Modify fckeditoreditorcssfck_editorarea.css
Set default font and size
Body, td
{
Font-family: Arial, Verdana, Sans-Serif;
Font-size: 14px;
}
3. file upload settings
Modify fckconfig. js
Var _ FileBrowserLanguage = 'php'; // asp | aspx | cfm | lasso | perl | php
Var _ QuickUploadLanguage = 'php'; // asp | aspx | cfm | lasso | php
Modify fckeditoreditorfilemanagerbrowserdefaconnectconnectorsphp
$ Config ['enabled'] = true;
$ Config ['userfilespath'] = '/UserFiles/'; // you can specify the folder to be uploaded.
Modify fckeditoreditorfilemanageruploadphp
$ Config ['enabled'] = true;
$ Config ['usefiletype'] = true;
$ Config ['userfilespath'] = '/UserFiles/'; // same as above
4. When an online editor is introduced, 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.
Bytes. This afternoon, baidu finally finished the solution. Download FCKeditor2.3.2 and decompress it to FCKeditor. 1 First delete unnecessary...