如何使用第三方编辑器给网页添加编辑器?

首先下载CKEditor:

http://ckeditor.com/download

解压并复制CKEditor到项目WebRoot中

在页面中引入CKEditor:

1.<scripttype="text/javascript" src="<%=request.getContextPath()%>/ckeditor/ckeditor.js"> </script>

 

2.在“内容”textarea标签中加入class="ckeditor"

引入后就可以使用CKEditor编辑新闻的内容了

编辑好新闻内容后,就可以提交到doAdd.jsp,把新闻存入数据库中

猜你喜欢

转载自blog.csdn.net/java_stud/article/details/80542294