fckeditor配置

下载2。6编辑器,和for java 2。3 包解压在网站根目录ROOT下,我使用的是TOMCAT默认根目录,再将for java包里的lib里的包复制到WEB-INF/lib下,并将 fckeditor.tld也复制到WEB-INF下修改/WebRoot/WEB-INF/web.xml文件,只定义了两个Servlet映射,并且对上传文件的目录和允许哪些文件上传、拒绝哪些文件上传做了设置,请注意,这两个servlet的url-pattern我都在原来代码的前面加上了/fckeditor,这是表示FCKeditor的根目录。另外SimpleUploader中的enabled属性要改成true,允许上传,增加内容如下: Connector com.fredck.FCKeditor.connector.ConnectorServlet baseDir /UserFiles/ debug true 1 Connector /fckeditor/editor/filemanager/browser/default/connectors/jsp/connector


Tag library
Declare the tag extension in each JSP page that uses the FCKeditor.Java taglib. The uri directive must match the uri defined in the tag reference. The prefix identifies the tags in the tag library within a JSP page.

<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>The declaration, if you are using a JSP XML syntax, looks like:

<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:FCK="http://java.fckeditor.net">Now you are set to use the taglib. A brief declaration would be:

<FCK:editor instanceName="EditorDefault">
<jsp:attribute name="value">This is some <strong>sample text</strong>.
You are using <a href="http://www.fckeditor.net">FCKeditor</a>.
</jsp:attribute>
</FCK:editor>For a more complete overview, take a look at the tag reference.
[img]http://dl.iteye.com/upload/attachment/598612/810fca79-c820-3dd4-8d28-2edf3e040e47.jpg[/img]
[img]http://dl.iteye.com/upload/attachment/598598/85a21f94-d80f-371c-a8df-447880a94248.jpg[/img]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值