servlet servlet-name Connector servlet-name servlet-class com.fredck.FCKe" name="description" />
配置web.xml 支持FCKEditor的图片文件上传和浏览 < servlet > MILY: 宋体; mso-font-kerning: 1.0pt; mso-bidi-font-family: 'Times New Roman'; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"> 1.3 加入FCKeditor-2.3.jar和commons-fileupload.jar 1.4 但是fckeditor的文件实在太多了,让人没来由一阵心痛,删除以下目录及文件: 1./_testcases, /_samples, 1.5 将干净的fck目录复制到项目中 1.6 修改配置文件 fckconfig.js FCKConfig.DefaultLanguage = 'zh-cn' ; 删除spell check 相关的两处地方 修改如下 url, 使用 fckeditor servelt 来做文件上传与目录浏览:
在http://www.fckeditor.net/ 下载FCKeditor 2.3 和FCKeditor.Java包 FCKeditor-2.3.jar
< servlet-name > Connector < SPAN>servlet-name >
< servlet-class > com.fredck.FCKeditor.connector.ConnectorServlet < SPAN>servlet-class >
< init-param >
< param-name > baseDir < SPAN>param-name >
< param-value > /uploadfiles/ < SPAN>param-value >
< SPAN>init-param >
< init-param >
< param-name > debug < SPAN>param-name >
< param-value > false < SPAN>param-value >
< SPAN>init-param >
< load-on-startup > 2 < SPAN>load-on-startup >
< SPAN>servlet >
< servlet >
< servlet-name > SimpleUploader < SPAN>servlet-name >
< servlet-class > com.fredck.FCKeditor.uploader.SimpleUploaderServlet < SPAN>servlet-class >
< init-param >
< param-name > baseDir < SPAN>param-name >
< param-value > /uploadfiles/ < SPAN>param-value >
< SPAN>init-param >
< init-param >
< param-name > debug < SPAN>param-name >
< param-value > false < SPAN>param-value >
< SPAN>init-param >
< init-param >
< param-name > enabled < SPAN>param-name >
< param-value > true < SPAN>param-value >
< SPAN>init-param >
< init-param >
< param-name > AllowedExtensionsFile < SPAN>param-name >
< param-value />
< SPAN>init-param >
< init-param >
< param-name > DeniedExtensionsFile < SPAN>param-name >
< param-value > php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi|htm|html < SPAN>param-value >
< SPAN>init-param >
< init-param >
< param-name > AllowedExtensionsImage < SPAN>param-name >
< param-value > jpg|gif|jpeg|png|bmp < SPAN>param-value >
< SPAN>init-param >
< init-param >
< param-name > DeniedExtensionsImage < SPAN>param-name >
< param-value />
< SPAN>init-param >
< init-param >
< param-name > AllowedExtensionsFlash < SPAN>param-name >
< param-value > swf|fla < SPAN>param-value >
< SPAN>init-param >
< init-param >
< param-name > DeniedExtensionsFlash < SPAN>param-name >
< param-value />
< SPAN>init-param >
< load-on-startup > 1 < SPAN>load-on-startup >
< SPAN>servlet >
url-pattern -->
< servlet-mapping >
< servlet-name > Connector < SPAN>servlet-name >
< url-pattern > /components/fck/editor/filemanager/browser/default/connectors/jsp/connector < SPAN>url-pattern >
< SPAN>servlet-mapping >
< servlet-mapping >
< servlet-name > SimpleUploader < SPAN>servlet-name >
< url-pattern > /components/fck/editor/filemanager/upload/simpleuploader < SPAN>url-pattern >
< SPAN>servlet-mapping >
2./editor/_source, /editor/skins/office2003, /editor/skins/silver,
/editor/filemanager/upload, /editor/filemanager/browser/default/connector
3./editor/lang 仅保留en.js,zh_cn.js
4.在/的php,py等后缀名的文件
5.删除plugin目录和dialog目录的spellcheck
如果还有时间可以修理一下FCKConfig.ToolbarSets["Default"],只留下需要的功能。
在 JSP 中的使用方法