FCKeditor 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.2.zip (main file of FCKeditor) and copy the FCKeditor directory to the root directory of the website,
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.
3,Copy the servlet-mapping definitions in the FCKeditor-2.3/web/WEB-INF/Web. XML to the Web. xml file of your 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> |
Is
<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 files under the FCKeditor-2.3/web/WEB-INF/lib directory to the Lib folder of your project
5,Add:
// Add at the beginning of the file <% @ Taglib uri = "http://fckeditor.net/tags-fckeditor" prefix = "fck" %> // Add the desired location <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 the server test .... 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 :))
Finished. Is it refreshing now?
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 at the front end, pay attention to related security issues. Do not use the default toolbar when using FCKeditor at the front end,
To remove the Add image, Flash, and image domain buttons
In fckconfig. JS, about 78 rows are configured with values in those arrays, just like a function on the interface. You can force each group of values to try out what they represent. : P
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.