这里我为大家介绍FCKeditor工具的使用.
<!-- 导入相应的FCKeditor的js文件 -->
<script type="text/javascript" src="${pageContext.request.contextPath }/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
$(function(){
//创建对象
var oFCKeditor=new FCKeditor('content');//参数就是提交表单时的参数名
//必须要指定的属性
//用于指定fckeditor的核心文件(javascript,css,html等文件)的存放路径
oFCKeditor.BasePath="${pageContext.request.contextPath}/fckeditor/";//用于指定fckeditor核心文件存放的路径。
//一些配置
oFCKeditor.Height=300;
oFCKeditor.Width="93%";
oFCKeditor.ToolbarSet="bbs";
//替换指定位置为ofckeditor
oFCKeditor.ReplaceTextarea();
});
</script>