FCKeditor

        FCKeditor是目前最优秀的可见即可得网页编辑器之一,它采用JavaScript编写。具备功能强大、配置容易、跨浏览器、支持多种编程语言、开源等特点,使用非常流行。


开发步骤:

1、创建web工程,导入jar包:将jar包导入至web-inf目录下lib文件夹中。

2、把fckeditor文件夹复制到webroot文件夹下。

FCKeditor_第1张图片

3、在jsp页面头部引入tablib指令和fck标签

<%@ taglib uri="http://java.fckeditor.net" prefix="FCK"%>


4、在中加入自定义标签

核心代码:

启动服务,到浏览器页面查看结果

FCKeditor_第2张图片


注意事项:

1、FCKeditor非空验证只能是根据API如下
FCKeditorAPI.GetInstance("content").GetXHTML()==""

2、FCKeditor编辑器中的内容清空操作

FCKeditorAPI.GetInstance("content").EditorDocument.body.innerHTML = "";


更多参考链接:

FCKeditor的js验证:http://www.cnblogs.com/caihong5459/archive/2008/10/25/1319424.html

FCKeditor的配置与使用:http://huaxia524151.iteye.com/blog/846520

你可能感兴趣的:(开发工具)