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:
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>
/editor/filemanager/browser/default/connectors/jsp/connector
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>/editor/filemanager/upload/simpleuploader</url-pattern>
</servlet-mapping>
For:
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>
/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>/FCKeditor/editor/filemanager/upload/simpleuploader</url-pattern>
</servlet-mapping>
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:
// 文件开头处加入
<%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCK" %>
//要使用的地方加入
<FCK:editor id="content" basePath="/FCKeditor/"
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 :)
</FCK:editor>
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.
The installation FCKeditor is complete, and the detailed configuration you can look at Fckeditor-2.3.zip, (jsp,fckeditor consolidation Package) folder in the Web/_samples directory example.