简介
FCKeditor是一个专门使用在网页上属于开源的所见即所得文字编辑器。它志于轻量化,不需要太复杂的安装步骤即可使用。它可和PHP、JavaScript、ASP、ASP.NET、ColdFusion、Java、以及ABAP等不同的编程语言相结合
准备
首先需要下载它的安装包,地址是:
http://download.csdn.net/detail/yanan_seachange/5758467
第一个示例
下载完成后,将FCKeditor_2.6.10.zip解压,并将其下整个fckeditor文件夹复制到你的Web项目的webroot目录下。
如下图:
在web-inf目录下,加入如下jar包:
然后jsp页面如下:
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FckEditor</title>
</head>
<body>
<h2 align="center">FckEdit</h2>
<hr>
<form action="doSaveContentServlet" method="post">
<FCK:editor instanceName="content" height="500px" width="600px">
</FCK:editor>
<input type="submit" value="提交 ">
</form>
</body>
</html>