FCKeditor PHP configuration, Super Invincible simple ____php

Source: Internet
Author: User
Speaking of this, is depressed, the Internet to find n information, it is more and more confused Ah, and finally I see the code to fix. For the convenience of future study also small remember it.

1, download FCKeditor multi-language version

2, after decompression for the folder to lose weight:

Delete all files except Fckconfig.js, Fckeditor.js, Fckstyles.xml, fcktemplates.xml,fckeditor.php Five files in the/fckeditor/directory
Deletes the directory/editor/_source,_testcases (basically, all folders or files beginning with _ are optional),
Delete all directories under/editor/filemanager/browser/default/connectors/except the PHP directory
Delete all directories except the PHP directory under/editor/filemanager/upload/
Delete all files under/editor/lang/except En.js, Zh.js, zh-cn.js three files
3.
Open/fckeditor/fckconfig.js
Modify
var fckconfig.defaultlanguage = ' ZH-CN ';
var _filebrowserlanguage = ' php ';
var _quickuploadlanguage = ' php ';
To turn on file uploads, you also need to configure fckeditor/editor/filemanager/upload/php/config.php and/fckeditor/editor/filemanager/browser/ default/connectors/php/config.php
(Upload Chinese name file will be garbled)

4. Calling methods
Place the FCKeditor in the site root directory
Inside the PHP file, include the/fckeditor/fckeditor.php file
Include FCKeditor class
Include (".. /fckeditor/fckeditor.php ");
Set Editor Path
$sBasePath = "/fckeditor/";
Create a FCKeditor, the name of the form is ipaddr
$oFCKeditor = new FCKeditor (' ipaddr ');
$oFCKeditor->basepath = $sBasePath;
Set the form's initial value
$oFCKeditor->value = ' This is some <strong>sample text</strong> ';
$oFCKeditor->create ();

You can also set
$oFCKeditor->width
$oFCKeditor->height
$oFCKeditor->toolbarset

5. Custom
A. Custom Call path
Change the FCKeditor directory directly to editor/and specify the root path as/editor/when called.
B. Custom style
You can customize the style by modifying the skin in the Editor/skins directory, mainly by modifying the CSS.
C. custom Toolbar

In Fckconfig.js, the default custom Default,basic two kinds of toolbar, you can also customize their toolbar according to the format, and use in PHP $ofckeditor->toolbarset= Toolbarname Call

D. customizing fonts
Add the Fckconfig.fontnames font list in the Fckconfig.js to the front:
XXFarEastFont-Arial Bold; _gb2312;
(Note Save As UTF8 format)

E. Closing file uploads
I will fckconfig.js inside the Fckconfig.linkbrowser,fckconfig.imagebrowser, Fckconfig.flashbrowser,fckconfig.linkupload, Fckconfig.imageupload,fckconfig.flashupload set to False.
Ii. directly delete the PHP file inside the FileManager
Iii. Custom Toolbars
The most important point is that you need to change the PHP file below FileManager, only authenticated users can access it.

F. Note: Please edit the configuration file with an editor such as EditPlus, and note that the save format is UTF8.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.