Use FCKeditor2.3.2 in PHP to configure _ PHP Tutorial

Source: Internet
Author: User
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...

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.