`
duanfei
  • 浏览: 720545 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

jsp 文体编辑器

    博客分类:
  • JSP
 
阅读更多
首先,需要加载fck的jar包
在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>


如图:
  • 大小: 19.1 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics