1、下载
在java中使用fckeditor需要下载两个包文件fckeditor2.6.x和FCKeditor2.5.Java,这两个文件的关系大概是:
fckeditor2.6.x是fckeditor的包文件,其中包括了php,jsp等一些fckeditor编辑器的实现;
FCKeditor2.5.Java实现fckeditor和java整合的功能;
1、下载fckeditor2.6.x,网址如下http://ckeditor.com/download
2、下载FCKeditor.Java 下载地址:http://sourceforge.net/projects/fckeditor/files/FCKeditor.Java/
如果项目中有使用maven的话,可以在pom的dependency区加入如下配置即可:
<dependency>
<groupId>net.fckeditor</groupId>
<artifactId>java-core</artifactId>
<version>2.5</version>
</dependency>
如果如上下载路径失效,可以去fckeditor的官方网站http://java.fckeditor.net,参考其document文档,其中有更详细的下载说明以及使用说明;如是初学者,可以下载demo示例,对照示例的配置和代码会很快上手;
2、在项目的web.xml中注册fckeditor
<servlet>
<servlet-name>ConnectorServlet</servlet-name>
<servlet-class>
net.fckeditor.connector.ConnectorServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ConnectorServlet</servlet-name>
<!-- Do not wrap this line otherwise Glassfish will fail to load this file -->
<url-pattern>/fckeditor/editor/filemanager/connectors/*</url-pattern>
</servlet-mapping>
这样一来,/fckeditor/editor/filemanager/connectors/*的所有请求都会被net.fckeditor.connector.ConnectorServlet处理;
3、jsp上应用fckeditor
<FCK:editor instanceName="content" height="710px"
width="650px" basePath="/fckeditor/">
<jsp:attribute name="value">
<s:property value="kfRepo.content" escape="false"
escapeJavaScript="false" />
</jsp:attribute>
<jsp:body>
<FCK:config FullPage="true" />
</jsp:body>
</FCK:editor>
其中 instanceName="content" 对应action里的property属性,定义set/get方法;
4、fckeditor的配置:
fckeditor的使用配置,其中最常见的就是文件上传了,包括国际化问题,这些fckeditor2.5已经解决得很好的;
其他的一些fckeditor配置,详细可以参考fckeditor对应版本的官方文档;
主要应用的是工具栏的自定义配置,以及fckeditor配置文件的修改;
常见问题:
1、如果app发布在linux中,请注意分配上传文件夹的权限,例如:sudo chmod 777 文件夹
分享到:
相关推荐
FCKEditor2.6使用小示例FCKEditor2.6使用小示例FCKEditor2.6使用小示例FCKEditor2.6使用小示例
fckeditor2.6JAR,fckeditor2.6所需的jar
配置好的fckeditor2.6 lite3,请看bbs文件,直接可以使用
FCKeditor2.6.4.1 在线编辑器 JSP 还有JSP上传文件组件
FCKeditor 2.6 浏览服务器 图片预览 FCKeditor 2.6 浏览服务器 图片预览 FCKeditor 2.6 浏览服务器 图片预览 FCKeditor 2.6 浏览服务器 图片预览 FCKeditor 2.6 浏览服务器 图片预览
前段时间遇到fck最新版在asp中使用问题,现将配置过文件上传,由于时间仓促,做了简单精简,内附说明文件
FCKEditor2.6使用小示例完全示例
本项目是根据itcast 和网上找的一些资料,自己写出来的一个fckeditor 项目,希望对大家有用,内含我所用到的所有文件,包括 FCKeditor_2.6.6.tar.gz 、fckeditor-java-2.4-bin.zip、fckeditor-java-2.4-src.zip、slf...
Sablog-X和Sa系列程序将一直延续使用本人所精简的FCKeditor。 FCKeditor 2.6 精简版第三版(带表格)修改内容如下: 带表格功能 FCKeditor 2.6 精简版第三版修改内容如下: 修补第一第二版存在的焦点丢失BUG,即在IE...
jsp 程序调用fckeditor2.6 版本的 小例子 本人发现fckeditor2.6加 fckeditor for 2.3 的时候在上传中文文件的时候会出现乱码 所以本人就小改了一下 fckeditor2.3的源代码,以时间重命名上传文件名,没什么技术...
NULL 博文链接:https://william-k.iteye.com/blog/777938
FCKeditor_2.6.4.1.tar.gz,最好的html在线编辑工具,同时可以进行文件上传,适合php,asp,java
Sablog-X和Sa系列程序将一直延续使用本人所精简的FCKeditor。 第三版是全新精简,因为我实在找不到丢失焦点的问题到底出在哪里。这次我用SVN来开发,有错误马上还原。一步步调试过来。终于搞定FCKeditor 2.6最完善的...
FCKEDITOR 2.6 配置手册 不错的资料,推荐给大家。。。。。。。。。。。。
fckEditor2.6美化实用版 修正了一些错误!共享给网友
最新的fckeditor 2.6jsp版,完整安装包,解压后直接放在网站根目录下就能用了,各项已经配置好了。绝对OK
fckeditor2.6_zengli.chm
NULL 博文链接:https://liubin2010.iteye.com/blog/1095687
针对asp.net的FCKeditor2.6编辑器 花了一天的时间才弄好的 精简版的 可以直接使用
FCKeditor2.6 上传图片报错解决方案 用FCKeditor上传图片时出现XML request error:OK(200)错误。终结解决方案。 替换fckeditor\editor\filemanager\browser\default\js下面的fckxml.js