FCKeditor是一个专门使用在网页上属于开放源代码的所见即所得文字编辑器。它志于轻量化,不需要太复杂的安装步骤即可使用。它可和PHP、JavaScript、ASP、ASP.NET、ColdFusion、Java、以及ABAP等不同的编程语言相结合。“FCKeditor”名称中的“FCK” 是这个编辑器的作者的名字Frederico Caldeira Knabben的缩写。
FCKeditor 相容于绝大部分的网页浏览器,像是 : Internet Explorer 5.5+ (Windows)、Mozilla Firefox 1.0+、Mozilla 1.3+ 和 Netscape 7+。在未来的版本也将会加入对 Opera 的支援。
目前,fckeditor for java的最新的版本为2.4.1.可以在http://www.fckeditor.net/ 和 http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=129511下载最新的资源。
可以直接下载 fckeditor-java-demo-2.4.1.war 包。
第一步:开发环境搭建
Myeclipse6.0.2+eclipse+tomcat5.5.28。开发环境的搭建这里就不详细描述,请大家参考其他资料。
第二步:建立新的工程,工程名称为TestFCKeditor。内容如图:
第三步:解压缩fckeditor-java-demo-2.4.1.war
将fckeditor-java-demo-2.4.1解压缩后的所有文件拷贝到TestFCKeditor工程的WebRoot下。如图:
注意:
这里需要另外添加一个jar包到工程中,serializer.jar。如果不添加该jar包,The Server didn 't send back a proper XML response 会出现这个错误,原因是没有xml解析器。
第四步:web.xml文件的配置
配置web.xml文件,文件内容如下:
以下为引用的内容:
<servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>
net.fckeditor.connector.ConnectorServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>/fckeditor/editor/filemanager/connectors/*</url-pattern>
</servlet-mapping>
2.4.1版本的fckeditor已经不需要配置tld的相关内容,tld文件已经集成在jar包中,只需要在页面引用的时候直接调用就可以了。
第五步:建立test.jsp 内容如下:
以下为引用的内容:
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FCKeditor2.4.1</title>
<link href="sample.css" _fcksavedurl=""sample.css"" _fcksavedurl=""sample.css"" _fcksavedurl=""sample.css"" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="fckeditor.gif"
type="image/x-icon" />
<script type="text/javascript">
function FCKeditor_OnComplete(editorInstance) {
window.status = editorInstance.Description;
}
</script>
</head>
<body>
<form action="test.jsp" method="post" target="_blank">
<FCK:editor instanceName="EditorDefault">
<jsp:attribute name="value"><strong>FCKeditor2.4.1 for java 例子
</strong>
</jsp:attribute>
</FCK:editor>
</form>
</body>
</html>
启动tomcat,预览得到的结果:
到此,FCKeditor2.4.1运行成功!只需要获取textarea中的内容即可。
文章来自:中国建站圈(jzquan.com) 原文:http://www.jzquan.com/a/prog/jsp/200901124303.html
文章来自:中国建站圈(jzquan.com) 原文:http://www.jzquan.com/a/prog/jsp/200901124303.html
分享到:
相关推荐
FCKEditor for java FCKEditor for java FCKEditor for java FCKEditor for java
fckeditor for JAVA所需要的所有文件 包括: FCKeditor_2.6.3.zip //主文件 fckeditor-java-2.4.1-bin.zip //jsp整合包 fckeditor-java-demo-2.4.1.war //完整的项目实例,建议部署到服务器上面看一下这个然后...
FckEditor for java 2.4 JSP配置详解 FckEditor for java 2.4 JSP配置详解
FCKeditor for java2.4 远程保存图片 java版 功能介绍: 在FCKeditor中复制网页内容时,其中的图片仍然保存在源站点上,当远程服务器路径做出更改或者关闭,本地图片将无法打开。给网友造成不好的印象,使用本功能...
前段时间在fck的官网上溜达的时候发现了 fckEditor for java 2.4X 的版本,没想到for java的也有新的版本出来了,用了那么老长时间的for java2.3 ,呵呵 于是就下来体验了一下,确实不错,而且fck2.6的版本,对文件的上传...
FCKeditor for java 资源中已经包含了配置方法和所需要的东西,大家可以轻松使用,希望能给大家带来便利
2010年8月FckEditor for java 2.6的JSP 配置方法详解及精简后的MyEclipse工程文件 java版本 在线高级编辑文档器 最简单的配置,不需要过多配置,正确不繁杂,效果图文并茂,简单明了
自己做过的测试,有说明,希望与大家共享
NULL 博文链接:https://polokang.iteye.com/blog/336644
在Java Web应用中使用FCKeditor
博文链接:https://lkfnn.iteye.com/blog/194548
以前总是用eWebeditor作为网页编辑器,但总感觉用起来不爽,这次特从网上搜及并整理了FCKeditor在Java Web开发中的应用,希望对大家有所用。
这个是一个我修改过的fckeditor for jsp 的jar包的源代码,是fckeditor-2.3的,我修改了ConnectorServlet.java和SimpleUploaderServlet.java两个文件 我在这两个文件中都是加了一个静态变量encoding,private static...
jsp,FCKeditor整合包 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.
FCKeditor FCKeditor 源代码 / FCKeditor for java FCKeditor_2.6.6.zip fckeditor-java-2.4.2-bin.zip fckeditor-java-2.4.2-src.zip fckeditor-java-demo-2.4.2.war
FCKeditor在Java中的使用详解
网上有许多Fckeditor for java版本 但都缺少 slf4j-simple-1.5.2.jar文件 把完整版的发给大家 测试好的 可以用的
FCKeditor for java 博文链接:https://814318774.iteye.com/blog/1659942
FCKeditor_2.6.3.zip:编辑器的基本文件 fckeditor-java-2.4-bin.zip:用于集成jsp所需的jar类,5个 fckeditor-java-2.4-src.zip:开源的源码文件 ...FckEditor for java 2_4的JSP 配置方法详解.htm fckEditor .ppt