---
title: "FCKeditor在线编辑器的使用"
author: "lamono"
date: "2006-11-09T02:14:51Z"
tags: []
slug: "fckeditor"
draft: false
lastmod: "2006-11-09T02:14:51Z"
id: 49135
url: "https://lamono.iteye.com/blog/49135"
---

一、使用说明：

参考http://doodoo.blog.enorth.com.cn/article/126662.shtml文档，不过好像很简单。主要步骤：

1、下载：下载地址：http://sourceforge.net/project/showfiles.php?group\_id=75348&package\_id=75845  
我用的是最新版FCKeditor\_2.3.2.zip（包含editor和配置信息在里面）和FCKeditor\_2.3.zip（包含jar包和tld文件，web.xml文件），

1、在tomcat的webapp下建立FCKeditor文件夹，将FCKeditor\_2.3.zip解压后的web文件夹中内容拷贝（包括\_simples和WEB-INF两个文件夹），将src下的FCKeditor.tld拷贝到tomcat/webapp/FCKeditor/WEB-INF下。

2、将FCKeditor\_2.3.2.zip解压后里面的editor文件夹和fckconfig.js，fckeditor.js，fckstyles.xml，fcktemplates.xml四个文件拷贝到tomcat/webapp/FCKeditor下面。

3、修改web.xml,添加

    &lt;taglib&gt;  
        &lt;taglib-uri&gt;/TestFCKeditor&lt;/taglib-uri&gt;  
        &lt;taglib-location&gt;/WEB-INF/FCKeditor.tld&lt;/taglib-location&gt;  
    &lt;/taglib&gt;

通过上面三步，即完成下载和配置，

访问：http://localhost:8080/FCKeditor/\_samples/index.jsp，即可看到效果。

/\*--------------------------------------------------------------------------------------\*/

二、心得（from:http://mylog.lib.whpu.edu.cn/blogview.asp?logID=100）

1、把所有配置文件集中在editor文件下，有利于管理。

及把原fckeditor 下文件（fckconfig.js、fckeditor.js、fckeditor.asp、fckstyles.xml、fcktemplates.xml）copy到editor 下。  
1、需要修改editor/jsfck\_startup.js ,搜索

程序代码：

FCKScriptLoader.AddScript('../fckconfig.js')

 改为

程序代码：

FCKScriptLoader.AddScript('fckconfig.js')

 说明'fckconfig.js'与fckeditor.html 在同一目录  
2、修改fckconfig.js'  
增加

程序代码：

FCKConfig.BasePath="/../editor/"

将

程序代码：

FCKConfig.StylesXmlPath        = FCKConfig.EditorPath + 'fckstyles.xml' ;  
FCKConfig.TemplatesXmlPath    = FCKConfig.EditorPath + 'fcktemplates.xml' ;

为

程序代码：

FCKConfig.StylesXmlPath        = FCKConfig.EditorPath + 'editor/fckstyles.xml' ;  
FCKConfig.TemplatesXmlPath    = FCKConfig.EditorPath + 'editor/fcktemplates.xml' ;

或

程序代码：

FCKConfig.StylesXmlPath        = FCKConfig.BasePath + 'fckstyles.xml' ;  
FCKConfig.TemplatesXmlPath    = FCKConfig.BasePath + 'fcktemplates.xml' ;

/\*---------------------------------------------------------------------------------\*/

在jsp使用FCKEditor浏览服务器图片时错误：XML request error: Internal Server Error(500)  
我的这个错误的原因：没有xml解析器。  
解决方法如下：  
去 [http://apache.justdn.org/xml/xalan-j/binaries/](http://apache.justdn.org/xml/xalan-j/binaries/)  
下载 xalan-j\_2\_7\_0-bin-2jars.zip  
解压后把 xalan.jar，serializer.jar拷贝到应用的lib目录下，ok。

参考资料：  
1、[在jsp环境中配置使用FCKEditor](http://www.webjx.com/htmldata/2006-10-13/1160724595.html)  
2、[FCKeditor在线编辑器使用](http://doodoo.blog.enorth.com.cn/article/126662.shtml)  
3、http://sourceforge.net/project/showfiles.php?group\_id=75348&package\_id=75845