1、在 ueditor.all.min.js这个js中修改默认字体和字号:
代码:body{margin:8px;font-family:仿宋_GB2312;font-size:21px;}
2、增加其他字体:
1)在ueditor.all.min.js中增加仿宋字体,如图,可以在文件中搜索fontfamily,找到位置修改:
fontfamily: [{
name: "songti",
val: "宋体,SimSun"
}, {
name: "FangSong_GB2312",
val: "仿宋_GB2312 ,FangSong_GB2312"
}, {
name: "yahei",
val: "微软雅黑,Microsoft YaHei"
}, {
name: "kaiti",
val: "楷体,楷体_GB2312, SimKai"
}, {
name: "heiti",
val: "黑体, SimHei"
}, {
name: "lishu",
val: "隶书, SimLi"
}, {
name: "andaleMono",
val: "andale mono"
}, {
name: "arial",
val: "arial, helvetica,sans-serif"
}, {
name: "arialBlack",
val: "arial black,avant garde"
}, {
name: "comicSansMs",
val: "comic sans ms"
}, {
name: "impact",
val: "impact,chicago"
}, {
name: "timesNewRoman",
val: "times new roman"
}],
2)在zh-cn2.js 里面修改:
'fontfamily':{
'songti':'宋体',
'FangSong_GB2312': '仿宋_GB2312',
'kaiti':'楷体',
'heiti':'黑体',
'lishu':'隶书',
'yahei':'微软雅黑',
'andaleMono':'andale mono',
'arial': 'arial',
'arialBlack':'arial black',
'comicSansMs':'comic sans ms',
'impact':'impact',
'timesNewRoman':'times new roman'
},
3、增加其他字号:
fontsize: [10, 11, 12, 14, 16, 18, 20,21, 24, 36], 在这个数组中增加其他字号就行
4、行间距:
lineheight: ["1", "1.5", "1.75", "2", "3", "4", "5"]
如果想要增加其他行间距,比如某个值,例如15px,可以如下修改: