Bkjia.com documentFCKeditor is an open-source project on sourceforge.net. It mainly implements the online web editor function and enables web programs to have powerful editing functions such as MS Word. Official Website for http://www.fckeditor.net, server support ASP. Net, ASP, ClodFusion, PHP, Java and other languages, and support IE 5 +, Mozilla, Netscape and other mainstream browsers.
Download fckeditor from the official website. Note that there are two packages: The main file and the jsp integration package.
1. Decompress fckeditor_2.4.2.zip (main FCKeditor file) and copy the FCKeditor directory to the root directory of the website,
: Http://www.hotlinkfiles.com/files/1859925_es3wd/FCKeditor_3.4.2.zip
2. Decompress fckeditor-2.3.zip, (jsp, FCKeditor Integration package), role: 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.
: Http://www.hotlinkfiles.com/files/1859924_qvixx/FCKeditor-2.3.zip
3. Copy the two servlets in FCKeditor-2.3/web/WEB-INF/web. xml, servlet-mapping definition to your project's web. xml file and modify
Modification result:
|
Reference content is as follows:
<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> |
Add the following content
Reference content is as follows:
<Taglib>
<Taglib-uri>/FCKeditor </taglib-uri>
<Taglib-location>/WEB-INF/FCKeditor. tld </taglib-location>
</Taglib> |
4, then we copy the two jar packages in FCKeditor-2.3 \ web \ WEB-INF \ lib to the \ fcktest \ WEB-INF \ lib directory, the FCKeditor under the FCKeditor-2.3 \ src. tld copies to \ fcktest \ WEB-INF.
5. Add:
Reference content is as follows:
// Add at the beginning of the file
<% @ Taglib uri = "/FCKeditor" prefix = "FCK" %> |
|
Reference content is as follows:
// Add the desired location
<FCK: editor id = "EditorAccessibility" width = "80%" height = "320" fontNames = "; _ GB2312; Arial; Comic Sans MS; courier New; Tahoma; Times New Roman; Verdana "imageBrowserURL ="/fkctest/FCKeditor/editor/filemanager/browser/default/browser.html? Type = Image & Connector = connectors/jsp/connector "linkBrowserURL ="/fkctest/FCKeditor/editor/filemanager/browser/default/browser.html? Connector = connectors/jsp/connector "flashBrowserURL ="/fkctest/FCKeditor/editor/filemanager/browser/default/browser.html? Type = Flash & Connector = connectors/jsp/connector "imageUploadURL ="/fkctest/FCKeditor/editor/filemanager/upload/simpleuploader? Type = Image "linkUploadURL ="/fkctest/FCKeditor/editor/filemanager/upload/simpleuploader? Type = File "flashUploadURL ="/fkctest/FCKeditor/editor/filemanager/upload/simpleuploader? Type = Flash "> </FCK: editor> <FCK: editor id =" EditorAccessibility "width =" 80% "height =" 320 "fontNames ="; body _ GB2312; Arial; Comic Sans MS; Courier New; Tahoma; Times New Roman; Verdana "imageBrowserURL ="/fkctest/FCKeditor/editor/filemanager/browser/default/browser.html? Type = Image & Connector = connectors/jsp/connector "linkBrowserURL ="/fkctest/FCKeditor/editor/filemanager/browser/default/browser.html? Connector = connectors/jsp/connector "flashBrowserURL ="/fkctest/FCKeditor/editor/filemanager/browser/default/browser.html? Type = Flash & Connector = connectors/jsp/connector "imageUploadURL ="/fkctest/FCKeditor/editor/filemanager/upload/simpleuploader? Type = Image "linkUploadURL ="/fkctest/FCKeditor/editor/filemanager/upload/simpleuploader? Type = File "flashUploadURL ="/fkctest/FCKeditor/editor/filemanager/upload/simpleuploader? Type = Flash "> </FCK: editor> |
Start server testing... After success, the FCKeditor will be reduced.
1. Delete all folders starting with "_" in the FCKeditor directory and subdirectory
2. Only fckconfig. js, FCKeditor. js, fckstyles. xml, and fcktemplates. xml are retained in the root directory of fckeditor.
3. Clear the files and folders in the editor/filemanager/upload directory.
4. You can also delete the skin files under the editor/skins directory, leaving only the default skin (if you do not need to change the skin)
5. you can also delete the files in the editor/lang directory and retain only en. js, fck1_agemanager. js, zh-cn.js, zh. js files (English, simplified Chinese, traditional Chinese should be enough :))
Complete.
Other problems:
When used in struts + spring + hibernate, the image upload function may report:
The output format must have a' {http://xml.apache.org/xalan=content-handler' property!
If the error occurs, try removing xalan *. jar under the WEB-INF/lib directory.
Security Questions:
If FCKEditor can be used by common users on the foreground, pay attention to related security issues. Do not use the default ToolBar when using the foreground. Remove the buttons for adding images, flash, and image domains, in fckconfig. about 78 lines in js configure the values in those arrays, just like a function on the interface, you can force each group of values to try out what they represent.
The fckeditorinstallation is complete. For detailed configuration, see the examples in the web/_ samples directory in the fckeditor-2.3.zip folder (jsp, FCKeditor integration package.