1、从
www.fckeditor.net官方网站上下载fckeditor压缩包。
2、建立webproject应用程序、
3、在建立的html文件中输入
<script type="text/javascript" src="/fckeditordemo/fckeditor/fckeditor.js"></script>
<form name="form1" action="/fckeditordemo/servlet/addFckeditor" method="post">
<input type="text" name="title" />
<script type="text/javascript">
var editor=new FCKeditor('editor');
editor.BasePath="/fckeditordemo/fckeditor/";//fckeditor.js 所在的目录
editor.Height=200;
editor.ToolbarSet='Default';
editor.Create();
</script>
<input type="submit" name="submit" value="提交" />
</form>
4、建立servlet
out.println("主题:"+"<br>");
out.println(request.getParameter("title")+"<br>");
out.println("内容:"+"<br>");
out.println(request.getParameter("editor"));