FCKEditor使用说明
来源:百度文库 编辑:神马文学网 时间:2024/04/29 11:23:22
时间: 2007-02-14 19:47 关键字: FCKEditor使用说明 引用 推荐 收藏
1. FCKeditor 介绍
FCKeditor 这个开源的HTML 文本编辑器可以让web 程序拥有如MS Word 这样强大的编辑功
能.FCKeditor 支持当前流行的浏览器如IE 5.5+, Firefox 1.0+, Mozilla 1.3+与Netscape 7+等。
FCKeditor官司方网址:http://www.fckeditor.net/
FCKeditor在线DEMO:http://www.fckeditor.net/demo
FCKeditor下载直址:http://www.fckeditor.net/download (该版本为2.3.2),最新版已经是2.4了。
2.FCKeditor.java介绍
不能直接在JSP项目中使用,需要FCKeditor.java库的支持。
FCKeditor.java是针对对JAVA中使用FCKeditor由Simone Chiaretta开发的FCKeditor的JAVA实现。
下载地址:http://www.fckeditor.net/download (最近版本为2.3)
3.在JAVA项目中使用FCKeditor在线编辑器
开发环境:JDK5.0 + Eclipse3.2.1 + WTP1.5.2
(1)新建一个WEB工程:
(2)解压 FCKeditor_2.3.2.zip包,将其中的 edit 文件夹到项目中的 WebRoot 目录
(3)解压 FCKeditor_2.3.2.zip 包,将其中的 fckconfig.js、fckeditor.js、fckstyles.xml、fcktemplates.xml 文件夹到项目中的 WebRoot 目录
(4)解压 FCKeditor.java-2.3.zip 包,将其中的 \web\WEB-INF\lib 下的两个 jar 文件到项目的 WebRoot\WEB-INF\lib 目录
(5)解压 FCKeditor.java-2.3.zip 包,将其中的 \src 下的 FCKeditor.tld 文件到项目的 WebContent\WEB-INF 目录
(6)删除 WebContent\edit 目录下的 _source 文件夹(以“_”开始的文件,在项目中无用)
完成后的目录结构下如:
说明:图中的input.jsp和display.jsp两个是我写的测试集成FCKeditor的JSP文件。
修改WebContent/WEB-INF/web.xml文件,加入FCKeditor的配置信息,如下:
xml 代码
xml version="1.0" encoding="UTF-8"?> FCKeditordisplay-name> Connectorservlet-name> com.fredck.FCKeditor.connector.ConnectorServlet servlet-class> baseDirparam-name> /UserFiles/param-value> init-param> debugparam-name> trueparam-value> init-param> 1load-on-startup> servlet> SimpleUploaderservlet-name> com.fredck.FCKeditor.uploader.SimpleUploaderServlet servlet-class> baseDirparam-name> /UserFiles/param-value> init-param> debugparam-name> trueparam-value> init-param> enabledparam-name> falseparam-value> init-param> AllowedExtensionsFileparam-name> param-value> init-param> DeniedExtensionsFileparam-name> php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi param-value> init-param> AllowedExtensionsImageparam-name> jpg|gif|jpeg|png|bmpparam-value> init-param> DeniedExtensionsImageparam-name> param-value> init-param> AllowedExtensionsFlashparam-name> swf|flaparam-value> init-param> DeniedExtensionsFlashparam-name> param-value> init-param> 1load-on-startup> servlet> Connectorservlet-name> /editor/filemanager/browser/default/connectors/jsp/connector url-pattern> servlet-mapping> SimpleUploaderservlet-name> /editor/filemanager/upload/simpleuploader url-pattern> servlet-mapping> web-app>
注:web.xml中已经加入了一些常用配置的说明。
新建input.jsp文件,内容如下:(注意内容中的” testfck”这个id)
(上面不能直接帖HTML的代码,所以只能帖一个图片上来,要是有知道如何帖HTML代码的朋友,请告诉我一下,谢谢)
说明:在JSP中集成FCKeditor JavaScript集成:
如上面内容所示,通过新建一个FCKeditor对象,然后调用该对象的设置方法来设置FCKeditor的各个属性,最后调用FCKeditor的ReplaceTextarea()替换HTML页面中的
1. FCKeditor 介绍
FCKeditor 这个开源的HTML 文本编辑器可以让web 程序拥有如MS Word 这样强大的编辑功
能.FCKeditor 支持当前流行的浏览器如IE 5.5+, Firefox 1.0+, Mozilla 1.3+与Netscape 7+等。
FCKeditor官司方网址:http://www.fckeditor.net/
FCKeditor在线DEMO:http://www.fckeditor.net/demo
FCKeditor下载直址:http://www.fckeditor.net/download (该版本为2.3.2),最新版已经是2.4了。
2.FCKeditor.java介绍
不能直接在JSP项目中使用,需要FCKeditor.java库的支持。
FCKeditor.java是针对对JAVA中使用FCKeditor由Simone Chiaretta开发的FCKeditor的JAVA实现。
下载地址:http://www.fckeditor.net/download (最近版本为2.3)
3.在JAVA项目中使用FCKeditor在线编辑器
开发环境:JDK5.0 + Eclipse3.2.1 + WTP1.5.2
(1)新建一个WEB工程:
(2)解压 FCKeditor_2.3.2.zip包,将其中的 edit 文件夹到项目中的 WebRoot 目录
(3)解压 FCKeditor_2.3.2.zip 包,将其中的 fckconfig.js、fckeditor.js、fckstyles.xml、fcktemplates.xml 文件夹到项目中的 WebRoot 目录
(4)解压 FCKeditor.java-2.3.zip 包,将其中的 \web\WEB-INF\lib 下的两个 jar 文件到项目的 WebRoot\WEB-INF\lib 目录
(5)解压 FCKeditor.java-2.3.zip 包,将其中的 \src 下的 FCKeditor.tld 文件到项目的 WebContent\WEB-INF 目录
(6)删除 WebContent\edit 目录下的 _source 文件夹(以“_”开始的文件,在项目中无用)
完成后的目录结构下如:
说明:图中的input.jsp和display.jsp两个是我写的测试集成FCKeditor的JSP文件。
修改WebContent/WEB-INF/web.xml文件,加入FCKeditor的配置信息,如下:
xml 代码
xml version="1.0" encoding="UTF-8"?>
注:web.xml中已经加入了一些常用配置的说明。
新建input.jsp文件,内容如下:(注意内容中的” testfck”这个id)
(上面不能直接帖HTML的代码,所以只能帖一个图片上来,要是有知道如何帖HTML代码的朋友,请告诉我一下,谢谢)
说明:在JSP中集成FCKeditor JavaScript集成:
如上面内容所示,通过新建一个FCKeditor对象,然后调用该对象的设置方法来设置FCKeditor的各个属性,最后调用FCKeditor的ReplaceTextarea()替换HTML页面中的