jsp中嵌入fckeditor编译器

本文介绍如何将FCKeditor富文本编辑器集成到JSP项目中,并详细说明了如何添加中文字体支持的方法。

下载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之类的字体名称
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值