UEditor版本以UEditor编辑器 1.6.6-1.6.9版本插入仿宋体为例:
需要修改两个文件:
1、plugin\UEditor\lang\zh-cn\zh-cn.js
大约在52行、53行插入红色字符:
‘fontfamily’:{
‘Fangsong’: ‘仿宋’,
‘FangSong_GB2312’: ‘仿宋_GB2312’,
‘songti’:’宋体’,
‘kaiti’:’楷体’,
‘heiti’:’黑体’,
‘lishu’:’隶书’,
‘yahei’:’微软雅黑’,
‘andaleMono’:’andale mono’,
‘arial’: ‘arial’,
‘arialBlack’:’arial black’,
‘comicSansMs’:’comic sans ms’,
‘impact’:’impact’,
‘timesNewRoman’:’times new roman’
},
2、plugin\UEditor\ueditor.all.min.js
找到 fontfamily 位置后,加入红色字符:
欢迎访问秀主题博客,分享简单实用WP教程{fontfamily:[{name:”Fangsong”,val:”仿宋,FangSong”},{name:”FangSong_GB2312″,val:”仿宋_GB2312,FangSong_GB2312″},{name:”songti”,val:”宋体,SimSun”},{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”}
其需要他字符按示例加入:
华文细黑:STHeiti Light [STXihei]
华文黑体:STHeiti
华文楷体:STKaiti
华文宋体:STSong
华文仿宋:STFangsong
俪黑 Pro:LiHei Pro Medium
俪宋 Pro:LiSong Pro Light
标楷体:BiauKai
苹果俪中黑:Apple LiGothic Medium
苹果俪细宋:Apple LiSung Light
新细明体:PMingLiU
细明体:MingLiU
标楷体:DFKai-SB
黑体:SimHei
宋体:SimSun
新宋体:NSimSun
仿宋:FangSong
楷体:KaiTi
仿宋_GB2312:FangSong_GB2312
楷体_GB2312:KaiTi_GB2312
微软正黑体:Microsoft JhengHei
微软雅黑体:Microsoft YaHei
隶书:LiSu
幼圆:YouYuan
华文细黑:STXihei
华文楷体:STKaiti
华文宋体:STSong
华文中宋:STZhongsong
华文仿宋:STFangsong
方正舒体:FZShuTi
方正姚体:FZYaoti
华文彩云:STCaiyun
华文琥珀:STHupo
华文隶书:STLiti
华文行楷:STXingkai
华文新魏:STXinwei