FCKeditor在线编辑器(Java)

 

FCKeditor在线编辑器
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配置文件中的信息,如下;


http://java.sun.com/dtd/web-app_2_3.dtd">

 FCKeditor Test Application

 
  Connector
  
   com.fredck.FCKeditor.connector.ConnectorServlet
  

  
   baseDir
   /UserFiles/
  

  
   debug
   true
  

  1
 

 
  SimpleUploader
  
   com.fredck.FCKeditor.uploader.SimpleUploaderServlet
  

  
   baseDir
   /UserFiles/
  

  
   debug
   true
  

  
   enabled
   true
  

  
   AllowedExtensionsFile
   
  

  
   DeniedExtensionsFile
   
    php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi
   

  

  
   AllowedExtensionsImage
   jpg|gif|jpeg|png|bmp
  

  
   DeniedExtensionsImage
   
  

  
   AllowedExtensionsFlash
   swf|fla
  

  
   DeniedExtensionsFlash
   
  

  1
 

 
  Connector
  
   /FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector
  

 

 
  SimpleUploader
  
   /FCKeditor/editor/filemanager/upload/simpleuploader
  

 

 
 
  /FCKeditor
  /WEB-INF/FCKeditor.tld
 


(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代码

<%@ page contentType="text/html;charset=GBK"%>
<%@ taglib uri="/FCKeditor" prefix="FCK"%>

 
  Welcome

 
 
  


       fontNames="宋体;黑体;隶书;楷体_GB2312;Arial;Comic Sans MS;Courier
New;Tahoma;Times New Roman;Verdana"
    imageBrowserURL="/FCKeditor-2.3/FCKeditor/editor/filemanager/browser/default/browser.html?
Type=Image&Connector=connectors/jsp/connector"
    linkBrowserURL="/FCKeditor-2.3/FCKeditor/editor/filemanager/browser/default/browser.html?
Connector=connectors/jsp/connector"
    flashBrowserURL="/FCKeditor-2.3/FCKeditor/editor/filemanager/browser/default/browser.html?
Type=Flash&Connector=connectors/jsp/connector"
    imageUploadURL="/FCKeditor-2.3/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"
    linkUploadURL="/FCKeditor-2.3/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"
    flashUploadURL="/FCKeditor-2.3/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash">

   

   
  


 

你可能感兴趣的:(编辑器,fckeditor,java,文本编辑,application,jsp,encoding)