在ueditor文件夹下有两个js文件,分别是ueditor.all.js和ueditor.all.min.js
打开这两个文件,找到如下代码:
//设置默认字体和字号
//font-family不能呢随便改,在safari下fillchar会有解析问题
'body{margin:8px;font-family:sans-serif;font-size:16px;}' +
将其中sans-serif修改为SimSun:
//设置默认字体和字号
//font-family不能呢随便改,在safari下fillchar会有解析问题
'body{margin:8px;font-family:SimSun;font-size:16px;}' +
==================================================================================
ueditor.config.js文件中可以修改你想要展示的字体,请看如下代码:
//fontfamily//字体设置 label留空支持多语言自动切换,若配置,则以配置值为准//,'fontfamily':[// { label:'',name:'songti',val:'宋体,SimSun'},// { label:'',name:'kaiti',val:'楷体,楷体_GB2312, SimKai'},// { label:'',name:'yahei',val:'微软雅黑,Microsoft YaHei'},// { label:'',name:'heiti',val:'黑体, SimHei'},// { label:'',name:'lishu',val:'隶书, SimLi'},// { label:'',name:'andaleMono',val:'andale mono'},// { label:'',name:'arial',val:'arial, helvetica,sans-serif'},// { label:'',name:'arialBlack',val:'arial black,avant garde'},// { label:'',name:'comicSansMs',val:'comic sans ms'},// { label:'',name:'impact',val:'impact,chicago'},// { label:'',name:'timesNewRoman',val:'times new roman'}//]
你如果只想要某一字体,把对应的注释放开即可。