- 浏览: 1333976 次
- 性别:
- 来自: 成都
文章分类
- 全部博客 (471)
- 原创文章 (4)
- Database (84)
- J2SE (63)
- Web (26)
- Javascript (30)
- Lucene (11)
- os (13)
- 算法 (8)
- Webservice (1)
- Open projects (18)
- Hibernate (18)
- Spring (15)
- Css (2)
- J2ee (2)
- 综合技术 (18)
- 安全管理 (13)
- PatternsInJava (27)
- NIO (5)
- Ibatis (2)
- 书籍收藏 (1)
- quartz (7)
- 并发编程 (15)
- oracle问题 (2)
- ios (60)
- coco2d-iphone (3)
- C++ (6)
- Zookeeper (2)
- golang (4)
- animation (2)
- android (1)
最新评论
-
dandingge123:
【引用】限制UITextField输入长度的方法 -
qja:
...
对List顺序,逆序,随机排列实例代码 -
安静听歌:
现在在搞这个,,,,,哎~头都大了,,,又freemarker ...
通用大型网站页面静态化解决方案(一) -
springdata-jpa:
java quartz定时任务demo教程源代码下载,地址:h ...
Quartz 配置参考 -
马清天:
[b][/b][list][*]引用[u][/u][/list ...
通用大型网站页面静态化解决方案(一)
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 -->
- <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
首先要在报头中加入
<%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="f"%>
还要注意basepath及path的设置
- <%
- 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>
发表评论
-
JavaScript初学者应注意的七个细节
2011-01-16 22:34 1112每种语言都有它特别的地方,对于JavaScript来说,使 ... -
META功能总结
2011-01-07 21:13 4665一、META的作用: meta标签通常用来为搜索引擎ro ... -
修改tomcat6配置,快速实现主域名、二级域名之间session共享
2010-12-02 22:04 2979项目中遇到了每个用户一个二级域名的应用,但在主域名登录后,在 ... -
实践中整理出tomcat集群和负载均衡
2010-11-25 23:33 1176(一)环境说明 (1)服务器有4台,一台安装apac ... -
httpsession的原理及负载均衡
2010-11-15 12:06 13564前阵子去面试正好被问到httpsession和cookie,今 ... -
Apache负载均衡+Tomcat集群
2010-10-26 21:56 1415核心提示:目标 : 使用 apache 和 tomcat ... -
Spring Ldap 域认证
2010-10-26 21:17 4498核心提示:近段时间接触了一个项目,用户认证部分是通过域认证 ... -
Spring + Tomcat 中配置连接池
2010-10-26 21:12 4849核心提示:Tomcat5 及 Tomcat6 下CP配置。 主 ... -
基于总线的消息服务(BBMS)的设计与实现
2010-10-26 21:09 2595核心提示:前言 异步事件的通知机制在比较有规模的软件设计中 ... -
JSON --- JAVA 使用方法
2010-10-25 22:51 1166JSON 即 JavaScript Object Natati ... -
大型门户网站架构分析
2010-10-24 15:48 5195千万人同时访问的网站,一般是有很多个数据库同时工作,说明白一点 ... -
fck config
2010-10-19 10:48 1530写道 * * FCKeditor - The text ... -
功能强大的fck编辑器(完整详解)
2010-10-19 10:39 3718一直都没找到完整的Fck ... -
ORACLE中的ROWID
2010-10-14 16:36 10971、rowid是一个伪列,是用来确保表中行的唯一性,它 ... -
用java获取真实的ip地址
2010-10-14 16:18 2195在JSP里,获取客户端的IP地址的方法是:reques ... -
实践中整理出tomcat集群和负载均衡
2010-10-14 15:50 1159实践中整理出tomcat集群 ... -
关于MapleFetion
2010-07-28 17:40 1833http://code.google.com/p/maplef ... -
jfreechart
2010-06-28 18:13 1455http://dev.firnow.com/course/3_ ... -
Java中如何实现Comet风格的Web应用(二)
2010-03-30 17:00 2854CometProcessor 接口要求实现 event 方法 ... -
Java中如何实现Comet风格的Web应用(一)
2010-03-30 16:55 1962开始 在本文中,我将展示如何使用各种不同的 Java ...
相关推荐
4. 使用`ReplaceTextarea()`方法将原有的多行文本框替换为FCKeditor编辑器。 如果需要实现图片上传功能,还需要以下步骤: 1. 引入必要的Java库文件,包括fckeditor-java-core-2.4.1.jar(FCKeditor核心)、commons...
FckEditor是一款强大的开源在线文本编辑器,广泛应用于网站建设和内容管理系统中,为用户提供类似桌面文字处理软件的编辑体验。它的全称为“FCKeditor”,最初由Fernando Goycoolea创建,后来更名为CKEditor。这款...
**FCKeditor在线编辑器(表情qq2008)** FCKeditor是一款开源的、功能强大的HTML在线编辑器,广泛应用于网站内容管理系统(CMS)和论坛等需要用户编辑和发布文本的地方。它允许用户通过类似Word的界面来编辑网页内容...
**fckeditor 在线编辑器详解** fckeditor是一款广泛使用的开源在线文本编辑器,它为Web应用程序提供了丰富的文本格式化功能,使得用户可以在浏览器环境中编辑HTML内容如同在桌面应用中一样方便。这款编辑器以其易用...
**FCKeditor在线编辑器** 是一款开源的富文本编辑器,广泛应用于Web开发中,为用户提供类似桌面文字处理软件的界面,使用户在网页上能够进行格式化文本的编辑。这款编辑器以其易用性、灵活性和强大的功能集而闻名,...
**FCKEditor在线编辑器详解** FCKEditor是一款开源的富文本编辑器,它为Web开发者提供了一种在网页上创建、编辑复杂内容的强大工具。这个编辑器支持多种浏览器,包括Internet Explorer、Firefox、Chrome、Safari等...
FckEditor在线编辑器在Java Web开发中应用非常广泛,成为开发者首选的在线编辑器。FckEditor提供了文本样式编辑、图片上传下载和附件上传下载等功能,为网络文本交互提供了强大支持。 知识点3:FckEditor在线编辑器...
FCKEditor是一款著名的开源富文本编辑器,它为用户提供了类似于Microsoft Word的在线编辑体验。在Web开发中,FCKEditor常被用于创建论坛、博客或其他内容管理系统(CMS)的后台编辑界面,让用户能够方便地编辑和格式...