Configuring the online editor fckeditor_php tutorial in PHP environment

Source: Internet
Author: User
Online editor FCKeditor 2.0PHP Environment trial
First, Introduction
November 30, 2004 launched the FCKeditor 2.0 RC1 version, according to its official website: This is the first stable version of the FCKeditor version 2.0. We can now consider the formal use of it. The currently supported background languages are ASP, ASP, PHP, and ColdFusion.

The author after a simple trial found that the online Editor version 2.0 is indeed more than the 1.6 version has a lot of improvements. The first is that FCKeditor's 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. Needless to say, let's hurry to learn how to install and configure FCKeditor 2.0.

Second, installation and example

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


N FCKeditor: Store the FCKeditor online editor downloaded from the website
N upimages: Used to store uploaded images
N admin: Store test page inside


The structure of the site is as follows:

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


Enter into the FCKeditor directory, open the _samples directory, which contains a variety of programming language calls FCKeditor sample program page, where the PHP directory contains some use of PHP to invoke FCKeditor example, you can see, To understand the calling method of Fckeditord, here is my shorthand for a test.php program, placed in the admin directory in the root directory of the Web site:


if ($_post["ADD"]) {
$Content =$_post[' Editordefault '];
Echo $Content;
Variable $content is what we edit in Fckeditord, where we can save it to the database and omit the code.
}

Third, configure the online editor

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


1. Toolbar settings


By default, FCKeditor will invoke the following toolbar buttons, which you can increase or decrease 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 settings

Edit Edit/lang/fcklanguagemanager.js

http://www.bkjia.com/PHPjc/632867.html www.bkjia.com true http://www.bkjia.com/PHPjc/632867.html techarticle Online editor FCKeditor in 2.0PHP Environment, Introduction November 30, 2004 FCKeditor 2.0 RC1 version, according to its official website said: This is the first stable version of the FCKeditor version 2.0 ...

  • 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.