Use FCKeditor2.3.2 configuration in PHP

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

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.