FCKeditor在线编辑器
FCKeditor 这个开源的HTML 文本编辑器可以让web 程序拥有如MS Word 这样强大的编辑功
FCKeditor官司方网址:http://www.fckeditor.net/
FCKeditor在线DEMO:http://www.fckeditor.net/demo
FCKeditor下载直址:http://www.fckeditor.net/download 最新版已经是2.6了。
在项目中使用FCKeditor在线编辑器:
(1) 新建一个WEB工程;
(2) 解压FCKeditor_2.6.zip包,将其中的editor文件夹复制到项目中去;
(3) 解压FCKeditor_2.6.zip包,将其中的fckconfig.js、fckeditor.js、fckstyles.xml、fcktemplates.xml赋值到项目中的WebRoot目录下面;
(4) 将FCKeditor.jar文件复制到WebRoot\WEB-INF\lib目录;
(5) 将FCKeditor.tld文件复制到WEB-INF下面;
(6) 修改web.xml配置文件中的信息,如下;
<!-- fckeditor start -->
Java代码
<servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>
com.fredck.FCKeditor.connector.ConnectorServlet
</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/UserFiles/</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>SimpleUploader</servlet-name>
<servlet-class>
com.fredck.FCKeditor.uploader.SimpleUploaderServlet
</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/UserFiles/</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>enabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>AllowedExtensionsFile</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsFile</param-name>
<param-value>
php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi
</param-value>
</init-param>
<init-param>
<param-name>AllowedExtensionsImage</param-name>
<param-value>jpg|gif|jpeg|png|bmp</param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsImage</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>AllowedExtensionsFlash</param-name>
<param-value>swf|fla</param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsFlash</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>PostArticle</servlet-name>
<servlet-class>servlet.PostArticle</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>
/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>
/FCKeditor/editor/filemanager/upload/simpleuploader
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>PostArticle</servlet-name>
<url-pattern>/servlet/post</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>
com.fredck.FCKeditor.connector.ConnectorServlet
</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/UserFiles/</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>SimpleUploader</servlet-name>
<servlet-class>
com.fredck.FCKeditor.uploader.SimpleUploaderServlet
</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/UserFiles/</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>enabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>AllowedExtensionsFile</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsFile</param-name>
<param-value>
php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi
</param-value>
</init-param>
<init-param>
<param-name>AllowedExtensionsImage</param-name>
<param-value>jpg|gif|jpeg|png|bmp</param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsImage</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>AllowedExtensionsFlash</param-name>
<param-value>swf|fla</param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsFlash</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>PostArticle</servlet-name>
<servlet-class>servlet.PostArticle</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>
/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>
/FCKeditor/editor/filemanager/upload/simpleuploader
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>PostArticle</servlet-name>
<url-pattern>/servlet/post</url-pattern>
</servlet-mapping><!-- fckeditor end -->
(7) 在JSP页面中使用,如:test.jsp
首先要在报头中加入Java代码
<%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="f"%>
<%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="f"%>还要注意basepath及path的设置
Java代码
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<body>
<form action="servlet/post" method="post">
title:<input type="text" name="title"><br>
<f:editor id="content" basePath='<%=path + "/FCKeditor/"%>'
imageBrowserURL='<%=path
+ "/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"%>'
linkBrowserURL='<%=path
+ "/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"%>'
flashBrowserURL='<%=path
+ "/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"%>'
imageUploadURL='<%=path
+ "/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"%>'
linkUploadURL='<%=path
+ "/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"%>'
flashUploadURL='<%=path
+ "/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash"%>'>
</f:editor>
<input type="submit">
</form>
</body>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<body>
<form action="servlet/post" method="post">
title:<input type="text" name="title"><br>
<f:editor id="content" basePath='<%=path + "/FCKeditor/"%>'
imageBrowserURL='<%=path
+ "/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"%>'
linkBrowserURL='<%=path
+ "/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"%>'
flashBrowserURL='<%=path
+ "/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"%>'
imageUploadURL='<%=path
+ "/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"%>'
linkUploadURL='<%=path
+ "/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"%>'
flashUploadURL='<%=path
+ "/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash"%>'>
</f:editor>
<input type="submit">
</form>
</body>
FCKeditor 这个开源的HTML 文本编辑器可以让web 程序拥有如MS Word 这样强大的编辑功
FCKeditor官司方网址:http://www.fckeditor.net/
FCKeditor在线DEMO:http://www.fckeditor.net/demo
FCKeditor下载直址:http://www.fckeditor.net/download 最新版已经是2.6了。
在项目中使用FCKeditor在线编辑器:
(1) 新建一个WEB工程;
(2) 解压FCKeditor_2.6.zip包,将其中的editor文件夹复制到项目中去;
(3) 解压FCKeditor_2.6.zip包,将其中的fckconfig.js、fckeditor.js、fckstyles.xml、fcktemplates.xml赋值到项目中的WebRoot目录下面;
(4) 将FCKeditor.jar文件复制到WebRoot\WEB-INF\lib目录;
(5) 将FCKeditor.tld文件复制到WEB-INF下面;
(6) 修改web.xml配置文件中的信息,如下;
<!-- fckeditor start -->
Java代码
<servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>
com.fredck.FCKeditor.connector.ConnectorServlet
</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/UserFiles/</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>SimpleUploader</servlet-name>
<servlet-class>
com.fredck.FCKeditor.uploader.SimpleUploaderServlet
</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/UserFiles/</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>enabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>AllowedExtensionsFile</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsFile</param-name>
<param-value>
php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi
</param-value>
</init-param>
<init-param>
<param-name>AllowedExtensionsImage</param-name>
<param-value>jpg|gif|jpeg|png|bmp</param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsImage</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>AllowedExtensionsFlash</param-name>
<param-value>swf|fla</param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsFlash</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>PostArticle</servlet-name>
<servlet-class>servlet.PostArticle</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>
/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>
/FCKeditor/editor/filemanager/upload/simpleuploader
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>PostArticle</servlet-name>
<url-pattern>/servlet/post</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>
com.fredck.FCKeditor.connector.ConnectorServlet
</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/UserFiles/</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>SimpleUploader</servlet-name>
<servlet-class>
com.fredck.FCKeditor.uploader.SimpleUploaderServlet
</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/UserFiles/</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>enabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>AllowedExtensionsFile</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsFile</param-name>
<param-value>
php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi
</param-value>
</init-param>
<init-param>
<param-name>AllowedExtensionsImage</param-name>
<param-value>jpg|gif|jpeg|png|bmp</param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsImage</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>AllowedExtensionsFlash</param-name>
<param-value>swf|fla</param-value>
</init-param>
<init-param>
<param-name>DeniedExtensionsFlash</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>PostArticle</servlet-name>
<servlet-class>servlet.PostArticle</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<url-pattern>
/FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SimpleUploader</servlet-name>
<url-pattern>
/FCKeditor/editor/filemanager/upload/simpleuploader
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>PostArticle</servlet-name>
<url-pattern>/servlet/post</url-pattern>
</servlet-mapping><!-- fckeditor end -->
(7) 在JSP页面中使用,如:test.jsp
首先要在报头中加入Java代码
<%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="f"%>
<%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="f"%>还要注意basepath及path的设置
Java代码
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<body>
<form action="servlet/post" method="post">
title:<input type="text" name="title"><br>
<f:editor id="content" basePath='<%=path + "/FCKeditor/"%>'
imageBrowserURL='<%=path
+ "/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"%>'
linkBrowserURL='<%=path
+ "/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"%>'
flashBrowserURL='<%=path
+ "/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"%>'
imageUploadURL='<%=path
+ "/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"%>'
linkUploadURL='<%=path
+ "/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"%>'
flashUploadURL='<%=path
+ "/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash"%>'>
</f:editor>
<input type="submit">
</form>
</body>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<body>
<form action="servlet/post" method="post">
title:<input type="text" name="title"><br>
<f:editor id="content" basePath='<%=path + "/FCKeditor/"%>'
imageBrowserURL='<%=path
+ "/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"%>'
linkBrowserURL='<%=path
+ "/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"%>'
flashBrowserURL='<%=path
+ "/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"%>'
imageUploadURL='<%=path
+ "/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"%>'
linkUploadURL='<%=path
+ "/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"%>'
flashUploadURL='<%=path
+ "/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash"%>'>
</f:editor>
<input type="submit">
</form>
</body>
发表评论
-
9个最佳的大数据处理编程语言
2017-07-31 14:01 284大数据的浪潮仍在继续 ... -
fckeditor编辑器使用方法
2008-12-05 14:02 1667javascript获取FCKeditor内容: // ... -
一位软件工程师的6年总结
2008-12-04 10:15 685“又是一年毕业时 ”, ... -
测试框架JUnit及其它
2008-08-19 10:07 1285JUnit 是一个简单易用的单元测试框架。随着敏捷开发和TDD ... -
中国程序员哪些缺点或是不足需要改进的
2008-08-14 09:23 2056一定要严谨、规范,思维要活跃,要按流程来操作。二是严密性 ... -
你是合格的程序员吗?—合格程序员应该具备的12种能力
2008-08-12 11:32 980毕业四年来,感觉自己 ... -
美国高级工程师谈Struts 走向
2008-08-12 11:30 815自从2000年Apache Struts出 ...
相关推荐
**FCKeditor编辑器简介** FCKeditor是一款开源的网页文本编辑器,它允许用户在浏览器端进行富文本编辑,提供了类似Word的编辑界面,支持多种格式的文本内容输入,如HTML、CSS样式等。这款编辑器在Web开发中被广泛...
实际上,需要对FCKeditor编辑器文件组中的通用配置文件/fckconfig.js和ASP.NET专用文件上传管理代码文件/editor/filemanager/connectors/aspx/config.ascx进行配置。 1. 配置控件语言 FCKeditor是自动探测浏览器...
《fckeditor编辑器插件深度解析与应用》 在网页内容编辑领域,fckeditor是一款备受开发者青睐的开源富文本编辑器。它提供了丰富的文本格式化功能,使得用户可以在浏览器端进行类似于Word般的文本编辑操作。本文将...
4. 使用`ReplaceTextarea()`方法将原有的多行文本框替换为FCKeditor编辑器。 如果需要实现图片上传功能,还需要以下步骤: 1. 引入必要的Java库文件,包括fckeditor-java-core-2.4.1.jar(FCKeditor核心)、commons...
**FCKeditor编辑器**是曾经非常流行的一款开源富文本编辑器,主要用于网页内容的创建和编辑。它提供了丰富的文本格式化选项,如字体、大小、颜色调整,以及插入图片、链接、表格等功能,使得非程序员也能轻松创建...
实际上,需要对FCKeditor编辑器文件组中的通用配置文件/fckconfig.js和ASP.NET专用文件上传管理代码文件/editor/filemanager/connectors/aspx/config.ascx进行配置。 1. 配置控件语言 FCKeditor是自动探测浏览器所...
FCKeditor是一款经典的开源富文本编辑器,广泛应用于ASP.NET平台。版本2.63针对之前版本中的上传文件问题进行了修复,确保用户可以顺畅地在编辑器中上传各种文件,如图片、文档等,这对于网站内容管理和用户交互具有...
在HTML页面中,通过引用fckeditor的JavaScript文件并配置编辑器实例,就可以在指定的元素(如textarea)上启用编辑器。以下是一个简单的集成示例: ```html <script src="path/to/fckeditor.js"> ...
### PHP中集成FCKeditor编辑器的详细指南 #### 一、引言 FCKeditor是一款功能强大且易于配置的富文本编辑器,基于JavaScript开发而成。它支持跨浏览器使用,并兼容多种编程语言,最重要的是它是完全开源免费的。...
FCKeditor是一个支持所见即所得(WYSIWYG,即What You See Is What You Get)功能的网页在线文本编辑器,它使得网页内容的编辑更加直观便捷,类似于在使用微软Office软件时编辑文档的感觉。FCKeditor允许用户在网页...
FCKEditor是一款著名的开源富文本编辑器,它为用户提供了类似于Microsoft Word的在线编辑体验。在Web开发中,FCKEditor常被用于创建论坛、博客或其他内容管理系统(CMS)的后台编辑界面,让用户能够方便地编辑和格式...
4. **实例化编辑器**:在JavaScript中创建FCKeditor实例,指定编辑器容器元素的ID。 ```javascript var oFCKeditor = new FCKeditor( 'editor' ) ; oFCKeditor.BasePath = '/fckeditor/' ; // 设置编辑器路径 ...
FckEditor是一款强大的开源在线文本编辑器,广泛应用于网站建设和内容管理系统中,为用户提供类似桌面文字处理软件的编辑体验。它的全称为“FCKeditor”,最初由Fernando Goycoolea创建,后来更名为CKEditor。这款...
### FCKeditor编辑器精简教程手册知识点梳理 #### 一、FCKeditor简介与应用场景 FCKeditor是一款广泛应用于Web开发领域的富文本编辑器,它支持多种编程语言环境,并且具备良好的用户交互体验,能够方便地实现在线...
**fckeditor编辑器详解与配置指南** 在Web开发中,文本编辑器是不可或缺的一部分,它为用户提供了在网页上编辑富文本内容的便利。fckeditor是一款功能强大的开源JavaScript富文本编辑器,支持多种浏览器,包括IE、...
在本文中,我们将深入探讨如何将phpcms V9系统中的默认fckeditor编辑器替换为kindeditor编辑器。这个过程涉及到对网站后台管理系统的修改,以提供更好的文本编辑体验。首先,我们来了解一下这两个编辑器的基本情况。...
**fckeditor编辑器详解** fckeditor是一款开源的Web富文本编辑器,它为网页开发者提供了一个强大而便捷的工具,允许用户在浏览器端编辑HTML内容,就像在桌面应用中一样。这款编辑器以其丰富的功能、良好的兼容性和...