原文地址http://hi.baidu.com/huqiwen/blog/item/7d36b15113fddd1e377abe7d.html

由于FckEditor for java 2.4相对于2.3而言做了许多改变,这些改变使得我们的Fckeditor配置起来更方便。例如:

基础包名从:com.fredck.FCKeditor 改为 net.fckeditor.

文件上传SimpleUploaderServle整合到了ConnectorServlet里面,WEB,XML的配置就简单多了,下面通过一个实例说明配置详细步骤

1、首先登陆www.fckeditor.net/download下载FCKeditor的最新版本,需要下载2个压缩包,一个是基本应用。另一个是在为在jsp下所准备的配置。

最新版本为:FckEditor2.6.3和FckEditor for java 2.4

FCKeditor 2.6.3下载地址:sourceforge.net/project/downloading.php      
       具体下载地址:http://easynews.dl.sourceforge.net/sourceforge/fckeditor/FCKeditor_2.6.3.zip
       FCKeditor for Java 下载地址:sourceforge.net/project/downloading.php
     具体下载地址:http://switch.dl.sourceforge.net/sourceforge/fckeditor/fckeditor-java-2.4-bin.zip(发行版,如果需要源码或者demo包请另行下载)

请下载demo包,否则会出现留言中那位朋友的错误!

下载之后分别为:FCKeditor_2.6.3.zip 和 fckeditor-java-2.4-bin.zip(fckeditor-java-demo-2.4.war)将它们分别解压。

2、首先在MyEclipse(或者其他的IDE)下建立一个新项目例如:

现在将解压后的FCKeditor_2.6.3.zip 里面的fckeditor文件夹拷贝到当前的项目的webroot文件夹下

3、配置web.xml。配置文件如下,这就是全部了,其他的不需要再配置,由于SimpleUploaderServle整合到了ConnectorServlet里面,所以文件上传等都不需要再配置。

<servlet><servlet-name>Connector</servlet-name><servlet-class>net.fckeditor.connector.ConnectorServlet</servlet-class><load-on-startup>1</load-on-startup>
</servlet><servlet-mapping><servlet-name>Connector</servlet-name><url-pattern>/fckeditor/editor/filemanager/connectors/*</url-pattern>
</servlet-mapping>

4、在src目录下面建立fckeditor.properties资源文件,在里面写入这么一行“connector.userActionImpl=net.fckeditor.requestcycle.impl.UserActionImpl”

5、下面写测试页面:

index.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
<html>
<head>    <title>FckEditor测试</title>
</head>
<body style="text-align: center;">
<div style="text-align: center;width: 600pt">
<h2>FckEditor测试</h2>
<hr>
<form action="ShowData.jsp" method="post"><FCK:editor instanceName="test" height="400pt"><jsp:attribute name="value"> 这里是<a href="http://hi.baidu.com/huqiwen">数据测试</a></jsp:attribute>
</FCK:editor>      <input type="submit" value="提交"/><input type="reset" value="重置"/></form>
</div>
</body>
</html>

显示数据的页面:ShowData.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<head><title>FCKeditor - 显示数据</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<%request.setCharacterEncoding("UTF-8");String data = request.getParameter("test");
%>
<body><h1>FCKeditor - 显示数据</h1>  <hr/><br /><%=data%>
</body>
</html>

6、结果截图

index.jsp

ShowData.jsp

6、给FckEditor瘦身

删除fckeditor目录下面所有以“_”开头的文件或者文件夹,像"_samples"、"_documentation.html“等

删除fckeditor目录下面除了,fckconfig.js   fckpackage.xml fckstyles.xml   fcktemplates.xml外的所有文件,当然要保留editor文件夹

删除fckeditor/editor/lang目录下面除了en.js、 zh-cn.js外的所有文件

删除fckeditor\editor\filemanager目录下面的connectors文件夹

删除editor\skins目录下面除了default下面的文件夹,这个里面是皮肤,共有三种,可以在fckconfig.js里面设置。

PS:demo下载:http://www.namipan.com/d/7218d2c0bf3e33e8aedf972b41d5d09f3efab0d8f53b0900

再PS:有关中文乱码问题请参考:http://hi.baidu.com/huqiwen/blog/item/c709aa18fa187a0135fa4103.html

转载于:https://www.cnblogs.com/gaoyoubo/archive/2010/02/10/1667127.html

fckeditor配置相关推荐

  1. Fckeditor配置 for ASP.NET

    FCKeditor介绍 FCKeditor是一个功能强大支持所见即所得功能的文本编辑器,可以为用户提供微软office软件一样的在线文档编辑服务.它不需要安装任何形式的客户端,兼容绝大多数主流浏览器, ...

  2. 最强悍的FCKEditor配置和攻略(转载)

    FckEditor配置手册中文教程详细说明(转载) http://www.360doc.com/content/070913/13/25392_740975.html 性能 首先,FCKEDITOR的 ...

  3. ASP.NET下FCKeditor配置方法全解

    本文所采用的FCKeditor版本是FCKeditor 2.6.4和FCKeditor.NET 2.6.3,都是当前FCKeditor的最新版本,在http://www.fckeditor.net上可 ...

  4. 艾伟:FCKeditor 配置、扩展

    一.自定义 FCKeditor 的 BasePath BasePath 即FCKeditor在网站中的相对路径,默认值是 /fckeditor/,最好在Web.config appSettings中对 ...

  5. 在线富文本编辑器FckEditor配置(.Net Framework 3.5)

    进入FCKeditor文件夹,编辑 fckconfig.js 文件. 1.上传设置  .   var _FileBrowserLanguage         = 'php' ;         // ...

  6. FckEditor配置详解

    前言: FCKeidtor是个国外的多语言编辑器,你可以对其配置文件进行简单修改使之支持目前常用Web开发语言的应用,下面我就讲讲FCKeditor的最新版本2.4.2在php的具体配置过程,有不足和 ...

  7. FCKeditor 配置、扩展

    一.自定义 FCKeditor 的 BasePathBasePath 即FCKeditor在网站中的相对路径,默认值是 /fckeditor/,最好在Web.config appSettings中对其 ...

  8. FCKeditor配置和使用(转)

    FCKeditor是一个功能强大支持所见即所得功能的文本编辑器,可以为用户提供微软office软件一样的在线文档编辑服务.它不需要安装任何形式的客户端,兼容绝大多数主流浏览器,支持ASP.Net.AS ...

  9. FCKeditor配置与使用

    fckeditor - (1)资料介绍与安装  fckeditor介绍    FCKeditor是一个专门使用在网页上属于开放源代码的所见即所得文字编辑器.    1.fckeditor官网:http ...

最新文章

  1. 归纳工作中用到的Linux 命令
  2. Realm数据库使用
  3. 【Android 组件化】使用 Gradle 实现组件化 ( 组件 / 集成模式下的 Library Module 开发 )
  4. 实用的SqlHelper类
  5. 【ARM】ARM汇编程序设计(四) 选择结构
  6. Windows中Git无法显示中文
  7. Java多线程系列--“JUC锁”07之 LockSupport
  8. Linux系统 nginx伪静态配置及nginx重启
  9. 控制台应用程序转成MFC程序错误—OcrRec.exe触发一个触点,原因可能是堆被破坏
  10. 操作系统及IIS版本选择参考
  11. DeepStyle(第2部分):时尚GAN
  12. localhost已拒绝连接
  13. 【入门教程】TensorFlow 2 模型:深度强化学习
  14. 未来5年的人才需求达到2000万,掌握这门技能,月入上万不是梦
  15. Qt创建停靠悬浮窗口实例
  16. 用电脑搭建视频会议系统的方法
  17. IaaS、PaaS、SaaS、BaaS和FaaS英文全称以及解释说明
  18. DevOps落地实践:Azure
  19. 使用pygame绘制文字
  20. 【《C Primer Plus》读书笔记】第8章:字符输入/输出和输入验证

热门文章

  1. Windows10家庭版安装Docker Desktop(非Docker Toolbox)
  2. IS环境下配置PHP5+MySql+PHPMyAdmin
  3. monkey测试===通过monkey测试检查app内存泄漏和cpu占用
  4. expect 批量修改服务器用户密码
  5. 进入保护模式(三)内存的分页
  6. 常用的HTTP状态码
  7. 在VS2012中实现Ext JS的智能提示太简单了
  8. IOS UIPageController
  9. 系统集成资质 -考点分析- “三点估算法”出题的形式演化分析
  10. 两块网卡实现多台机器共享上网