Using FCKeditor2.3.2 Configuration in PHP

Source: Internet
Author: User
Tags config file upload html page

FCKeditor2.3.2 Online Editor is very easy to use, fully support file upload. Today, Baidu was finally finished in the afternoon. Download FCKeditor2.3.2 and extract to FCKeditor.

1 save space by deleting unnecessary files first. Any file that starts with _ such as _samples,_testcases and some of the unavailable. asp,. jsp,. cfm files.

2 modification Fckconfig.js

Fckconfig.autodetectlanguage = true;//whether the language is automatically detected

Fckconfig.defaultlanguage = ' ZH-CN ';//Set Language

Fckconfig.skinpath = Fckconfig.basepath + ' skins/default/'/Set skin

fckconfig.tabspaces = 1;//tab is valid

Fckconfig.toolbarstartexpanded = true;//edit toolbar appears, wait for "expand Toolbar" to appear

Fckconfig.fontnames = ' song body; bold; official script; italics _gb2312; Arial; Comic Sans MS; Courier New; Tahoma; Times New Roman; Verdana ';//Add Chinese font

Modify Fckeditoreditorcssfck_editorarea.css

Set default font and size

Body, TD

{

Font-family:arial, Verdana, Sans-serif;

font-size:14px;

}

3 about file Upload settings

Modify Fckconfig.js

var _filebrowserlanguage = ' php '; ASP | aspx | CFM | Lasso | Perl | Php

var _quickuploadlanguage = ' php '; ASP | aspx | CFM | Lasso | Php

Modify fckeditoreditorfilemanagerbrowserdefaultconnectorsphp

$Config [' Enabled '] = true;

$Config [' userfilespath '] = '/userfiles/';//Set up the uploaded folder, you can specify it yourself

Modify fckeditoreditorfilemanageruploadphp

$Config [' Enabled '] = true;

$Config [' usefiletype '] = true;

$Config [' userfilespath '] = '/userfiles/';

4 when you introduce an online editor, just

<?php

Include ("fckeditor/fckeditor.php");

$oFCKeditor = new FCKeditor (' FCKeditor1 ');//instantiation

$oFCKeditor->basepath = ' fckeditor/';//This path must be consistent with the introduction path above, or it will error: Could not find the fckeditor.html page

$oFCKeditor->value = ';

$oFCKeditor->width = ' 100% ';

$oFCKeditor->height = ' 300 ';

$oFCKeditor->create ();

?>

JS with alert (fckeditorapi.getinstance (' FCKeditor1 '). Getxhtml (true) to get the value of the FCKeditor1;

PHP uses $_post[' FCKeditor1 ' to get the FCKeditor1 value.

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.