Configuring the use of FCKeditor in a JSP environment detailed explanation

Source: Internet
Author: User
Tags zip root directory

FCKeditor is an open source project above SourceForge.net, which implements the functions of the Online Web page editor, allowing web programs to have powerful editing capabilities such as MS Word. The official website is http://www.fckeditor.net, support asp.net, ASP, clodfusion, PHP, Java and other languages on the server side, and support the mainstream browser such as IE 5+, Mozilla, Netscape.

First in the official website download FCKeditor, note that there are two packages, one is the main file, one is the JSP integration package.

1, decompression Fckeditor_2.2.zip, (fckeditor main file), the FCKeditor directory copied to the site root directory,

2, Decompression Fckeditor-2.3.zip, (Jsp,fckeditor integration package), function: This is the JSP integration pack for using FCKeditor inside a Java server page Without the complexity of using a Java scriptlets or the JavaScript API.

3. Copy two servlet,servlet-mapping definitions from fckeditor-2.3/web/web-inf/web.xml to web.xml files from the project

Modify:

Connector

/editor/filemanager/browser/default/connectors/jsp/connector

Simpleuploader

/editor/filemanager/upload/simpleuploader

For:

Connector

/fckeditor/editor/filemanager/browser/default/connectors/jsp/connector

Simpleuploader

/fckeditor/editor/filemanager/upload/simpleuploader

4. Copy the files in the Fckeditor-2.3/web/web-inf/lib directory to the Lib folder of your own project

5, in the need to use FCKeditor JSP interface to add:

Add at the beginning of the file

To use the place to join

Imagebrowserurl= "/fckeditor/editor/filemanager/browser/default/browser.html?"

Type=image&connector=connectors/jsp/connector "

Linkbrowserurl= "/fckeditor/editor/filemanager/browser/default/browser.html?"

Connector=connectors/jsp/connector "

Flashbrowserurl= "/fckeditor/editor/filemanager/browser/default/browser.html?"

Type=flash&connector=connectors/jsp/connector "

Imageuploadurl= "/fckeditor/editor/filemanager/upload/simpleuploader?" Type=image "

Linkuploadurl= "/fckeditor/editor/filemanager/upload/simpleuploader?" Type=file "

Flashuploadurl= "/fckeditor/editor/filemanager/upload/simpleuploader?" Type=flash ">

This is default content:)

Start Server test .... After success, to give FCKeditor thin body.

1, the FCKeditor directory and subdirectories under the "_" Underline the folder to delete

2.FCKeditor root directory only retains fckconfig.js, Fckeditor.js, Fckstyles.xml, fcktemplates.xml all the rest removed

3. Empty the files and folders in the Editor/filemanager/upload directory.

4. You can also delete the skin files in the Editor/skins directory, leaving only a default set of skin (if you do not need to change the skin)

5. Can also be deleted under the Editor/lang directory, only En.js, Fcklanguagemanager.js, Zh-cn.js, zh.js files (English, Simplified Chinese, traditional Chinese should generally be enough:))

Finished, now look is not refreshing a lot?

Other questions:

Used in Struts+spring+hibernate, the upload image function may appear in the report:

The output format must have a ' {Http://xml.apache.org/xalan}content-handler ' property!

Wrong situation, will web-inf/lib directory Xalan*.jar Delete try

Security issues:

If in the foreground lets the ordinary user also can use the FCKeditor, must pay attention to the related security question, in the foreground uses, do not use the default toolbar, will add the image, the flash, the image domain button to remove, in the Fckconfig.js approximately 78 row configuration The values in those arrays are like a function on the interface, you can force each set of values to try to represent what.

Related Article

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.