jeecg富文本編輯器增長字體(仿宋)
舒適提示:jeecg 提供了 uedit 富文本的實現,以下針對的是 uedit 增長仿宋字體示例。html
主要修改三個文件:plug-in\ueditor\ueditor.config.js、plug-in\ueditor\lang\en\en.js、plug-in\ueditor\lang\zh-cn\zh-cn.jsapp
一、ueditor.config.js
在該文件中找到:fontfamily 節點,取消該節點的所有註釋。編輯器
,'fontfamily':[
{ label:'',name:'songti',val:'宋體,SimSun'},
{ label:'',name:'fangsong',val:'仿宋,FangSong'},
{ 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'}
]
二、zh-cn.js
一樣找到 fontfamily 節點,增長 'fangsong': '仿宋'post
'fontfamily':{
'songti':'宋體',
'fangsong':'仿宋',
'kaiti':'楷體',
'heiti':'黑體',
'lishu':'隸書',
'yahei':'微軟雅黑',
'andaleMono':'andale mono',
'arial': 'arial',
'arialBlack':'arial black',
'comicSansMs':'comic sans ms',
'impact':'impact',
'timesNewRoman':'times new roman'
},
三、en.js
仍是 fontfamily 節點,增長 'fangsong':'FangSong'字體
'fontfamily':{
'songti':'Sim sun',
'fangsong':'FangSong',
'kaiti':'Sim kai',
'heiti':'Sim hei',
'lishu':'Sim li',
'yahei': 'Microsoft yahei',
'andaleMono':'Andale mono',
'arial': 'Arial',
'arialBlack':'Arial black',
'comicSansMs':'Comic sans ms',
'impact':'Impact',
'timesNewRoman':'Times new roman'
},
實現效果
最後
附上部分中文字體的英文名,方便添加字體url
華文細黑: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
華文新魏:STXinweispa
文章做者:niceyoo
文章地址:http://www.javashuo.com/article/p-wamqdkks-hr.html
若是以爲文章對你有所幫助,右下方點個推薦~code