Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How JSP uses FCKeditor

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

The editor will share with you how JSP uses FCKeditor. I hope you will get something after reading this article. Let's discuss it together.

FCKeditor is an open source project on sourceforge.net, which mainly implements the function of online web page editor, so that web programs can have such powerful editing functions as MS Word. The official website is http://www.fckeditor.net, which supports ASP.Net, ASP, ClodFusion, PHP, Java and other languages on the server side, as well as mainstream browsers such as IE 5 +, Mozilla and Netscape.

First download Fckeditor from the official website and notice that there are two packages, one for the main file and one for the JSP integration package.

1. Extract FCKeditor_2.2.zip, (FCKeditor main file), and copy the FCKeditor directory to the root directory of the website.

2. Decompress 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 the two servlet,servlet-mapping definitions in FCKeditor-2.3/web/WEB-INF/web.xml to the web.xml file of your own project, and 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 under the FCKeditor-2.3/web/WEB-INF/lib directory to the lib folder of your own project.

5. Add: in the interface where JSP is required to use FCKeditor:

/ / add at the beginning of the file

/ / add where you want to use

This is default content:)

Start the server test. After success, let's slim down FCKeditor.

1. Delete all folders under the FCKeditor directory and subdirectories that begin with an underscore

Only fckconfig.js, fckeditor.js, fckstyles.xml, and fcktemplates.xml are deleted under the 2.FCKeditor root directory.

3. Empty the files and folders under the editor/filemanager/upload directory.

4. You can also delete the skin file in the editor/skins directory, leaving only default a set of skin (if you don't need to change the skin)

5. You can also delete files in the editor/lang directory, leaving only en.js, fcklanguagemanager.js, zh-cn.js, and zh.js files (English, simplified Chinese, traditional Chinese should generally be sufficient)

It's done, isn't it much fresher now?

Other questions:

When used in struts+spring+hibernate, a report may appear in the upload image function: The output format must have a'{http://xml.apache.org/xalan}content-handler' property! If it is wrong, try deleting the xalan*.jar under the WEB-INF/lib directory.

Security issues:

If you allow ordinary users to use FCKeditor in the foreground, you should pay attention to the relevant security issues. Do not use the default ToolBar when using it at the foreground.

To remove the add image, flash, image domain button

Configuring the values in those arrays on about 78 lines in fckconfig.js is like a function on the interface where you can force each set of values to represent something.

After reading this article, I believe you have a certain understanding of "how JSP uses FCKeditor". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report