fck使用

来源:互联网 发布:sql加密解密函数 编辑:程序博客网 时间:2024/05/23 01:11

因为项目需求,研究了一下FckEditor,现在叫ckeditor。版本到3.3.1。


安装什么都就不说了,google下载,解压缩,看_samples目录。


这里有几个小技巧记录一下:


  • 添加编辑器


<script type="text/javascript">
<!--
 

  CKEDITOR.replace("content",
 
     {
 
        skin: "kama", width:700, height:300
 
     });
//-->
</script>

高度宽度,皮肤可以设定。

    • 菜单按钮修改
    [['Preview'],['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print'],['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],['Bold','Italic','Underline','Strike'],['NumberedList','BulletedList','-','Outdent','Indent'],['Maximize'],'/',['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['Link','Unlink'],['Styles','Format','Font','FontSize'],['TextColor','BGColor']]
    ‘-’分块,'/'分行。需要什么自己往下删吧!


    • 中文字体

    打开config.js,添加上字体代码:

    CKEDITOR.editorConfig = function( config )
    {

          config.font_names='宋体/宋体;黑体/黑体;仿宋/仿宋_GB2312;楷体/楷体_GB2312;隶书/隶书;幼圆/幼圆;微软雅黑/微软雅黑;'+ config.font_names;
    };

     

    • 还有一点,我怎么看csdn这个在线编辑器想试FCK呢!
    • 禁用即时拼写检查     config.scayt_autoStartup = false;
    原创粉丝点击