ckeditor4.2.2自定义配置

阅读更多
修改config.js文件,删除里面所有内容,加入如下内容   

CKEDITOR.editorConfig = function( config ) 
    { 
   config.toolbar = 'simple';//把默认工具栏改为‘MyToolbar’
       config.toolbar_simple = 
        [ 
           // ['NewPage','Preview'], 
           // ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Scayt'], 
           // ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], 
           // ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],  
            ['Bold','Italic','Strike'], 
    ['Styles','Format','RemoveFormat'], 
            ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'], 
            ['Link','Unlink','Anchor'], 
           // ['Maximize','-','About'] 
        ];
     
        config.toolbar_full = 
        [ 
            ['NewPage','Preview'], 
            ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Scayt'], 
            ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], 
            ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'], 
            '/', 
            ['Styles','Format'], 
            ['Bold','Italic','Strike'], 
            ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'], 
            ['Link','Unlink','Anchor'], 
            ['Maximize','-','About'] 
        ]; 
config.toolbar_basic = 
    [ 
        //['NewPage','Preview'], 
        //['Cut','Copy','Paste','PasteText','PasteFromWord','-','Scayt'], 
        //['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], 
        ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar',
'PageBreak','-','Link','Unlink',/*'Anchor'*/'-','Bold','Italic','Strike','RemoveFormat'], 
        '/',  
        ['NumberedList','BulletedList','-','Outdent','Indent','Styles','Format']
    ]; 
    }; 

  
  • ckeditor配置及使用.zip (1.3 KB)
  • 下载次数: 8

你可能感兴趣的:(ckeditor,自定义)