FCKEditor详细使用说明
来源: 编辑:duliying 更新日期:2008-6-23 11:59:14 浏览:1106 次
javascript调用方式:
------------------------------------
<script. type=”text/javascript” src=”FCKeditor/fckeditor.js”></scrīpt>
<textarea name=”content” cols=”80″ rows=”4″>
</textarea>
<script. type=”text/javascript”>
var FCKeditor = new FCKeditor(”content”);
oFCKeditor.BasePath = “FCKeditor/”;
oFCKeditor.Height = 400;
oFCKeditor.ToolbarSet = “Default”;
oFCKeditor.ReplaceTextarea();
</script>
------------------------------------
如果想要使用从数据库读来的文本数据或者是后台来自文件的txt/html文本数据。
只要在
------------------------------------
<textarea name=”content” cols=”80″ rows=”4″>
</textarea>
------------------------------------
中加入自己的显示内容的formbean对应字段即可
------------------------------------
<textarea name=”content” cols=”80″ rows=”4″>
<c:out value=”${contentData}” />
</textarea>
------------------------------------
这样内容就会被显示在FCKeditor编辑框中了,点击提交按钮以后就可以在后台的相应java action中得到content参数中的内容就是页面上FCKeditor中的内容数据了。可以在struts/jsf中使用。
====================================
由于给FCKeditor瘦身,所以常会报缺少对象支持等错误,只要在FCKeditor/editor/lang中加上相应的js语言文件即可。如果加载页面失败(FCKeditor未定义)还有一个可能就是引用FCKeditor/fckeditor.js文件路径不对!
关于FCKeditor瘦身要点如下:
第1页/总15页
第一页 上一页
下一页 最后一页
【发表评论】