Home >Backend Development >PHP Tutorial >fckeditor download FCKeditor installation PHP
1. Download the latest version of FCKEditor and unzip it
2. Delete all files except fckconfig.js, fckeditor.js, fckstyles.xml, fcktemplates.xml, fckeditor.php in the /FCKeditor/ directory
Delete directory/ editor/_source,_testcases (basically, all folders or files starting with _ are optional),
Delete all directories under /editor/filemanager/browser/default/connectors/ except the PHP directory
Delete /editor/filemanager All directories under /upload/ except the PHP directory
Delete all files under /editor/lang/ except the three files en.js, zh.js, zh-cn.js
3.
Open /FCKeditor/fckconfig. js
Modify
var FCKConfig.DefaultLanguage = 'zh-cn' ;
var _FileBrowserLanguage = 'php' ;
var _QuickUploadLanguage = 'php' ;
To enable file upload, you also need to configure FCKeditoreditorfilemanageruploadphpconfig.php and FCKeditoreditorfilemanagerbrowserdefaultconnectorsphpconfig.php
( Uploading files with Chinese names will cause garbled characters)
4. Call the method
Place FCKeditor in the root directory of the website
In the PHP file, include the /FCKeditor/fckeditor.php file
//Contains the fckeditor class
include("../FCKeditor/fckeditor .php") ;
//Set the editor path
$sBasePath = "/FCKeditor/";
//Create a Fckeditor, the name of the form is ipaddr
$oFCKeditor = new FCKeditor('ipaddr') ;
$oFCKeditor- >BasePath = $sBasePath ;
//Set the initial value of the form
$oFCKeditor->Value = 'This is some sample text' ;
$oFCKeditor->Create() ;
/ / You can also set
$oFCKeditor->Width
$oFCKeditor->Height
$oFCKeditor->ToolbarSet
5. Customize
a. Customize the calling path
Directly change the FCKeditor directory to editor/, and when calling Specify the root path as /editor/.
b. Customized style
You can customize the style by modifying the Skin in the editorskins directory, mainly modifying the CSS.
c. Customize toolbar
In fckconfig.js, Default and Basic toolbars are customized by default. You can also customize your own toolbar according to the format, and use $oFCKeditor->ToolbarSet=toolbarname in php to call
d. Customize fonts
Add in front of the FCKConfig.FontNames font list in fckconfig.js:
Song style; Hei style; Official script; Kai style_GB2312;
(Note to save in UTF8 format)
e. Close the file upload
i. Add fckconfig.js The FCKConfig.LinkBrowser, FCKConfig.ImageBrowser, FCKConfig.FlashBrowser, FCKConfig.LinkUpload, FCKConfig.ImageUpload, FCKConfig.FlashUpload are set to false.
ii. Directly delete the php files in filemanager
iii. Customize toolbars
The most important thing One thing, you need to change the php file under filemanager so that only authenticated users can access it.
f. Note: Please use an editor such as Editplus to edit the configuration file, and pay attention to the saving format as utf8.
Others:
The installation method of asp is basically similar, just replace all php with asp.
Under the JSP platform, you need to delete everything under filemanager and replace it with Servlet. You need to modify several configurations in fckconfig.js (LinkBrowserURL, ImageBrowserURL, FlashBrowserURL, LinkUploadURL, FlashUploadURL, ImageUploadURL).
The above has introduced the fckeditor download and FCKeditor installation PHP, including the content of fckeditor download. I hope it will be helpful to friends who are interested in PHP tutorials.