Configure online Editor in PHP environment FCKeditor

Source: Internet
Author: User
Tags line editor

On-line editor FCKeditor 2.0PHP Environment trial in small memory
First, Introduction
November 30, 2004 launched the FCKeditor 2.0 RC1 version, according to its official website said: This is the FCKeditor 2.0 version of the first stable version. You can now consider the formal use of it. The background languages currently supported are ASP, ASP.net, PHP, and ColdFusion.

After a simple trial, the author found that the online Editor version 2.0 does have a lot of improvement over the 1.6 edition. The first is that the FCKeditor file structure is clearer and can be more easily deployed in its own system. The other 2.0 version finally supported the Firefox 1.0 browser, which will win more users for FCKeditor. Nonsense not to say, let us hurry to learn how to install, configure FCKeditor 2.0 bar.

Ii. Installation and Example

First go to http://sourceforge.net/projects/fckeditor/to download FCKeditor 2.0 RC1 (554K) and unzip it to your Web site directory, and change the folder name to FCKeditor. For example, if your site is under the Shaof directory, create 3 subdirectories in this directory:


N FCKeditor: Store the FCKeditor online editor downloaded from the website
N upimages: for storing uploaded pictures
N admin: Inside store test page


The structure of the website is as follows:

/fckeditor//fckeditor Directory
/userfiles//Upload file directory
/admin
test.php//Submit data page
testsubmit.php//Display data page


Into the FCKeditor directory, open the _samples directory, which contains a variety of programming languages call FCKeditor Sample Program page, where the PHP directory contains some use PHP to invoke the example of FCKeditor, you can see, To understand the Fckeditord invocation method, here is a test.php program that I have abbreviated, placed in the admin directory under the root directory of the site:


if ($_post["ADD"]) {
$Content =$_post[' Editordefault '];
Echo $Content;
Variable $content is what we edit in the Fckeditord, which can be saved to the database, the code omitted.
}

Third, configure the online editor

The configuration file for FCKeditor 2.0 is fckeditorfckconfig.js, and several important configuration items are as follows:


1, the toolbar settings


By default, FCKeditor will invoke the following toolbar button, you can add or subtract according to your needs. It should be stressed that the 2.0 version and the 1.6 version of the button is not exactly the same, some buttons and deleted or renamed.


//##
# # Toolbar Buttons Sets
//##
fckconfig.toolbarsets["Default" = [
[' Source ', '-', ' Save ', ' newpage ', ' Preview '],
[' Cut ', ' Copy ', ' Paste ', ' pastetext ', ' Pasteword ', '-', ' Print '],
[' Undo ', ' Redo ', '-', ' find ', ' Replace ', '-', ' selectall ', ' Removeformat '],
[' Bold ', ' italic ', ' underline ', ' strikethrough ', '-', ' subscript ', ' superscript '],
[' Orderedlist ', ' unorderedlist ', '-', ' outdent ', ' Indent '],
[' Justifyleft ', ' justifycenter ', ' justifyright ', ' justifyfull '],
[' Link ', ' Unlink '],
[' Image ', ' Table ', ' rule ', ' Specialchar ', ' Smiley '],
[' Style ', ' Fontformat ', ' fontname ', ' fontsize '],
[' TextColor ', ' bgcolor '],
[' About ']
] ;


2, Simplified Chinese set

Edit Edit/lang/fcklanguagemanager.js

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.