百度编辑器 Ueditor 下拉处增加字体

Posted James的博客园

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了百度编辑器 Ueditor 下拉处增加字体相关的知识,希望对你有一定的参考价值。

左百度,添加到同右钉邮那么多:

                                             

 

1、\\ueditor\\lang\\zh-cn\\zh-cn.js  文件中找到:fontfamily节点,替换如下:

\'fontfamily\':{
        \'songti\':\'宋体\',
        \'heiti\':\'黑体\',
        \'kaiti\':\'楷体\',
        \'lishu\':\'隶书\',
        \'yahei\':\'微软雅黑\',
        \'arial\':\'arial\',
        \'arialBlack\':\'arial black\',
        \'bookAntiqua\':\'Book Antiqua\',
        \'Calibri\':\'Calibri\',
        \'comicSansMs\':\'comic sans ms\',
        \'Courier New\':\'Courier New\',
        \'Garamond\':\'Garamond\',
        \'Georgia\':\'Georgia\',
        \'Helvetica\':\'Helvetica\',
        \'impact\':\'impact,chicago\',
        \'Narrow\':\'Narrow\',
        \'Sans Serif\':\'Sans Serif\',
        \'Serif\':\'Serif\',
        \'Symbol\':\'Symbol\',
        \'Tahoma\':\'Tahoma\',
        \'timesNewRoman\':\'times new roman\',
        \'Trebuchet MS\':\'Trebuchet MS\',
        \'Verdana\':\'Verdana\',
        \'andaleMono\':\'andale mono\'
    },

 

2、ueditor\\editor.config.js   文件中

 ,\'fontfamily\':[
            { label:\'\',name:\'songti\',val:\'宋体,SimSun\'},
            { label:\'\',name:\'heiti\',val:\'黑体, SimHei\'},
            { label:\'\',name:\'kaiti\',val:\'楷体,楷体_GB2312, SimKai\'},
            { label:\'\',name:\'lishu\',val:\'隶书, SimLi\'},
            { label:\'\',name:\'yahei\',val:\'微软雅黑,Microsoft YaHei\'},
            { label:\'\',name:\'arial\',val:\'arial, helvetica,sans-serif\'},
            { label:\'\',name:\'arialBlack\',val:\'arial black,avant garde\'},//Arial Black
            { label:\'\',name:\'bookAntiqua\',val:\'Book Antiqua\'},//
            { label:\'\',name:\'Calibri\',val:\'Calibri\'},//Calibri
            { label:\'\',name:\'comicSansMs\',val:\'comic sans ms\'},
            { label:\'\',name:\'Courier New\',val:\'Courier New\'},//Courier New
            { label:\'\',name:\'Garamond\',val:\'Garamond\'},//Garamond
            { label:\'\',name:\'Georgia\',val:\'Georgia\'},//Georgia
            { label:\'\',name:\'Helvetica\',val:\'Helvetica\'},//Helvetica
            { label:\'\',name:\'impact\',val:\'impact,chicago\'},
            { label:\'\',name:\'Narrow\',val:\'Narrow\'},//Narrow
            { label:\'\',name:\'Sans Serif\',val:\'Sans Serif\'},//Sans Serif
            { label:\'\',name:\'Serif\',val:\'Serif\'},//Serif
            { label:\'\',name:\'Symbol\',val:\'Symbol\'},//Symbol
            { label:\'\',name:\'Tahoma\',val:\'Tahoma\'},//Tahoma
            { label:\'\',name:\'timesNewRoman\',val:\'times new roman\'},//Times New Roman
            { label:\'\',name:\'Trebuchet MS\',val:\'Trebuchet MS\'},//Trebuchet MS
            { label:\'\',name:\'Verdana\',val:\'Verdana\'},//Verdana
            { label:\'\',name:\'andaleMono\',val:\'andale mono\'}
        ]

 

以上是关于百度编辑器 Ueditor 下拉处增加字体的主要内容,如果未能解决你的问题,请参考以下文章

UEditor百度编辑器,工具栏添加一个普通按钮

百度编辑器ueditor 光标位置的坐标

百度富文本编辑器UEDITOR

百度编辑器table嵌套table错误

UEditor字体和字号不显示

ueditor如何设置br标签的字体为宋体