下载fckeditor,网址:http://ckeditor.com/demo/
问题一:嵌入jsp中
1.在<head></head>标签中引入<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
2.然后加入
<script type="text/javascript">
//创建FCKeditor
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'content') ;
oFCKeditor.BasePath = "/MyBlog/fckeditor/" ;
oFCKeditor.ToolbarSet='Default';//订制工具栏Basic或Default
oFCKeditor.Height=400;//高度
oFCKeditor.ReplaceTextarea() ;//替换textarea
}
</script>
<textarea id="MyTextarea" name="MyTextarea">This is <b>the</b> initial value.</textarea>
问题二:如何加入中文字体
解答:在fckconfig.js中,FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana ' ;
在之后增加宋体,黑体,隶书,楷体_GB2312之类的字体名称
本文介绍如何将FCKeditor富文本编辑器集成到JSP项目中,并详细说明了如何添加中文字体支持的方法。

3007

被折叠的 条评论
为什么被折叠?



