首先fckeditor文件考进项目中,
然后将jar包考进bin中
添加fckeditor.properties文件
然后在web.xml文件中配置
<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>
在jsp页面中添加 taglib标签:<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
接下来就和用html的标签一样了
<FCK:editor instanceName="productIntro" width="700pt" height="230pt">
<jsp:attribute name="value">请填写产品描述</jsp:attribute>
</FCK:editor>
instanceName就是控件的名称, attribute就是默认显示在里面的文字
js中可通过 var productIntro=document.getElementById("productIntro");得到它的值