折腾了两天,从eWebEditor到CKeditor再到FCKeditor真是费足了劲了!
本人比较喜欢开源的,在网上狂搜一通最后被CKeditor强大的功能和华丽的界面吸引的五体投地~~,高高兴兴的下载了CKeditor,花费了半天的时间终于把CKeditor配置好了,结果一点图片发现连个上传图片的按钮都没有( ~~~~(>_<)~~~~ ),原来还需要一个CKfinder插件。于是又兴冲冲的跑到官网上找CKfinder,找到最后却发现就是没有java版的!!!而且这个插件好像是要收费的,哎~真是郁闷死了。
不能用CKeditor那就用FCKeditor吧,呵呵,下面牢骚归正传:
一、首先到官网下载最新版本的
FCKeditor 2.6.5 下载地址:http://sourceforge.net/project/downloading.php?group_id=75348&filename=FCKeditor_2.6.5.zip
FCKeditor.Java 2.6 要下的有 fckeditor-java-demo-2.6.war (示例,我觉得下载这一个就够了)
fckeditor-java-2.6-src.zip (源文件,如果你想看就下吧)
fckeditor-java-2.6-bin.zip (我下了,但没有上)
二、(1)、把FCKeditor 2.6.5 解压到WebRoot下
(2)、解压fckeditor-java-2.6-bin.zip,把文件夹中的fckeditor-java-core-2.6.jar以及lib中的所有jar包拷贝到你的web程序的lib中,fckeditor-java-demo-2.6.war中的slf4j-simple-1.5.8.jar也要拷进去(注意:slf4j-api和slf4j-simple的版本一定要一致)。如果你觉得麻烦,那么就从fckeditor-java-demo-2.5.war中直接将lib文件夹下的所有jar包复制到项目的lib中,我就是这么做的。
(3)、把fckeditor-java-demo-2.6.war 中的web.xml中的servlet的配置复制到你的web程序中web.xml中。
<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>
(4)、把fckeditor-java-demo-2.6.war 中的fckeditor.properties复制到你项目的src中
(5)、通过它提供的标签库添加应用:
在需要应用的jsp页面添加taglib:
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%>
然后是引用入编辑框:
<FCK:editor instanceName="content" basePath="/FCKeditor" > </FCK:editor>
(6)、通过iframe添加应用:
<input id="content" name="content" value="" type="hidden" /><iframe id="content___Frame" frameborder="0" height="200" scrolling="no" width="100%" src="/dsqcb.com/fckeditor/editor/fckeditor.html?InstanceName=content&Toolbar=Default"> </iframe>
三、新建个测试页面试一下。
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<body style="text-align:center;">
<FCK:editor instanceName="content" basePath="/fckeditor" > </FCK:editor>
</body>
</html>
四、呵呵,出来了……
看看能不能传图片……
哈哈,上传成功!
看看能不能浏览服务器……
呵呵,也没问题啊!
分享到:
相关推荐
三个压缩文件是我自己下载的,配置资料是网上的。 FCKeditor_2.6.5.zip fckeditor-java-2.6-bin.zip fckeditor-java-demo-2[1].6.war.zip 至于源码包,是用不上的
NULL 博文链接:https://wangdingxin.iteye.com/blog/2313262
非常好的FCKeditor Jsp 文本编辑器!! 经过本人修改和配制,功能已全部实现!!! 非常好的jsp文本编辑器,带示例
FCKeditor Jsp 文本编辑器 绝对能用 而且超简单 里面带有示例,能运行。运行环境是: MyEclipse
FCKeditor2.3 for jsp编辑器(内附配置说明)
在jsp环境中配置使用FCKEditor(文本编辑器)
FCKEDITOR 在线编辑器,支持ASP,PHP,JSP.图片上传
FCKeditor2.6.4.1 在线编辑器 JSP 还有JSP上传文件组件
这是我在几天查找资料来做的。。。在我的测试当中算是没有问题。但不知道用在项目中会出现什么情况。。希望大家只是作为学习
JSP例子:Fckeditor整合web EQ 公式编辑器
fckeditor2.6.3在线编辑器,配套fckeditor.net 并且提供配置方法,以及常见问题。 支持ASP.NET,PHP,JSP
这是一套经过改良的专用于JSP的fckeditor,对应于fckeditor-2.4版本,fckeditor是一款有名的功能强大的网页在线编辑器,通过这款编辑器你可以对文字进行排版、插入上传图片、插入附件和链接等常用的图文处理功能,...
绝对好用的富文本编辑框 fckeditor 现在已经可以兼容java了 以后会兼容sturts 希望大家多多支持,多多研究 绝对能用 里面的JAR包 slf4j-api-1.5.2.jar slf4j-simple-1.5.2.jar fckeditor-java-core-2.4.jar ...
对fckeditor和kindeditor进行实例化,修改后可以将它们加入到自己的项目中去
非常好的FCkeditor jsp版范例 使用方法: 1.把范例的lib目录的5个jar包拷到你的工程的lib下 2.把范例的web.xml的配置代码拷到你的web.xml里 3.再看看范例的2个测试的jsp代码就OK了!
FCKeditor 这个开源的HTML 文本编辑器可以让web 程序拥有如MS Word 这样强大的编辑功能,.FCKeditor 支持当前流行的浏览器。
FCKeditor编辑器在JSP中的配置,这是个配置好的工程,相关说明在BLOG中
根据配置文件,配置好,已经解决了上传中文图片无法显示的bug
fckeditor commons-fileupload.jar FCKeditor-2.3.jar FCKeditor.tld web.xml struts2不兼容解决.txt