zoukankan      html  css  js  c++  java
  • 个人CKeditor的config.js配置

    /**
     * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
     * For licensing, see LICENSE.md or http://ckeditor.com/license
     */
    CKEDITOR.editorConfig = function( config ) {
        config.toolbar = 'Full';
        config.height = 380;
        config.toolbar_Full = [
            ['Bold','Italic','Underline'],
            ['NumberedList','BulletedList'],
            ['Link','Unlink'],
            ['Image'],
            ['Font','FontSize'],
            ['TextColor','BGColor'],
            ['JustifyLeft','JustifyCenter','JustifyRight'],
            ['Source'],
            ['Replace'],
            ['Maximize']
        ];
        config.resize_enabled = false;                    //禁止拖拽改变尺寸
        config.removePlugins = 'elementspath';            //删除底边栏
        config.image_previewText=' ';                //清空图片上传预览的内容
        config.image_prefillDimensions = false;            //禁止图片上传完毕后自动填充图片长和宽
        config.filebrowserUploadUrl ="**********";        //图片上传接口    
        config.extraPlugins = 'wordcount,notification,notificationaggregator';        //其他插件:字数统计、提示信息
        config.wordcount = {
            showParagraphs: false,                    // 是否统计段落数
            showWordCount: false,                    // 是否统计词数
            showCharCount: true,                    // 是否统计字符数
            countSpacesAsChars: false,                // 是否统计空间字符
            countHTML: false,                    // 是否统计包括HTML字符的字符数
            maxWordCount: -1,                    // 最大允许词数,-1表示无上限
            maxCharCount: 500,                    //最大允许字符数,-1表示无上限
            filter: new CKEDITOR.htmlParser.filter({        //添加筛选器添加或删除元素之前计数(CKEDITOR.htmlParser.filter),默认值:null (no filter)
                elements: {
                    div: function( element ) {
                        if(element.attributes.class == 'mediaembed') {
                            return false;
                        }
                    }
                }
            })
        };
        
        //添加中文字体
        config.font_names="宋体/SimSun;新宋体/NSimSun;仿宋_GB2312/FangSong_GB2312;楷体_GB2312/KaiTi_GB2312;黑体/SimHei;微软雅黑/Microsoft YaHei;幼圆/YouYuan;华文彩云/STCaiyun;华文行楷/STXingkai;方正舒体/FZShuTi;方正姚体/FZYaoti;"+ config.font_names;
    };
  • 相关阅读:
    没有插件的sublime编辑器是没有灵魂的
    原生JS简单的无缝自动轮播
    自学前端的日子,记录我的秃头之旅
    简洁快速的数组去重
    最困难的是带着自己的选择生活下去
    css画图那些事
    css3画图那些事(三角形、圆形、梯形等)
    SVN那些事
    关于使用JQ scrollTop方法进行滚动定位
    linux下mysql出现Access denied for user 'root'@'localhost' (using password: YES)解决方法
  • 原文地址:https://www.cnblogs.com/li-you/p/6016800.html
Copyright © 2011-2022 走看看