首先,需要加载fck的jar包
在resource中加入fckeditor的文件
在web.xml中添加
在jsp中
显示可以用
如图:
[img]http://dl2.iteye.com/upload/attachment/0096/5989/740c4a87-fea0-35c0-a40f-435933d16671.png[/img]
在resource中加入fckeditor的文件
在web.xml中添加
<!-- fckeditor -->
<servlet>
<servlet-name>ConnectorServlet</servlet-name>
<servlet-class>net.fckeditor.connector.ConnectorServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ConnectorServlet</servlet-name>
<url-pattern>
/resource/fckeditor/editor/filemanager/connectors/*
</url-pattern>
</servlet-mapping>
在jsp中
<%@taglib uri="http://java.fckeditor.net" prefix="FCK"%>
<FCK:editor basePath="/resource/fckeditor" instanceName="yixinArticleForm.description" height="300px"><jsp:attribute name="value">${yixinArticleForm.description}</jsp:attribute>
</FCK:editor>
显示可以用
<div style="height:400px;overflow-y:auto;">
${yixinArticleForm.description}
</div>
如图:
[img]http://dl2.iteye.com/upload/attachment/0096/5989/740c4a87-fea0-35c0-a40f-435933d16671.png[/img]