欢迎访问我的博客 https://javascript.shop

ckeditor自己用的配置文件config.js

原文发布时间为:2011-01-17 —— 来源于本人的百度文章 [由搬家工具导入]

CKEDITOR.editorConfig = function(config) {
    // Define changes to default configuration here. For example:
    // config.language = 'fr';
    // config.uiColor = '#AADC6E';

    config.skin = "kama";
    //config.ContextMenu = ['Generic','Anchor','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form'] ;
    config.font_names = '宋体/宋体;黑体/黑体;仿宋/仿宋_GB2312;楷体/楷体_GB2312;隶书/隶书;幼圆/幼圆;' + config.font_names;

    config.height = "300";
    //config.contentsCss = '/css/mysitestyles.css';
    config.toolbar = 'MyToolbar';
    //['Source'],
    config.toolbar_MyToolbar =
 [['Source','-','Preview'],
  ['Cut', 'Copy', 'Paste'],
     ['Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'NumberedList', 'BulletedList', 'Outdent', 'Indent'],
     ['Table', 'HorizontalRule', 'PageBreak'],
     ['Link', 'Unlink', 'Image', 'Flash', 'Undo', 'Redo']
 ];
    config.protectedSource.push(/<\s*iframe[\s\S]*?>/gi); // <iframe> tags.
    config.protectedSource.push(/<\s*frameset[\s\S]*?>/gi); // <frameset> tags.
    config.protectedSource.push(/<\s*frame[\s\S]*?>/gi); // <frame> tags.
    config.protectedSource.push(/<\s*script[\s\S]*?\/script\s*>/gi); // <SCRIPT> tags.
    config.protectedSource.push(/<%[\s\S]*?%>/g); // ASP style server side code
    config.protectedSource.push(/<\?[\s\S]*?\?>/g); // PHP style server side code
    config.protectedSource.push(/(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi);

};

posted @ 2017-07-14 00:56  孑孓子  阅读(190)  评论(0编辑  收藏  举报
欢迎访问我的博客 https://javascript.shop