关于KingEditor字体的问题

开发中客户要求字体按照word里面的格式将xp直接改为几号字体

将fontSizeTable:["9px","10px","12px","14px","16px","18px","24px","32px"]

改为fontSizeTable:["小六","六号","小五","五号","小四","四号","小二","小一"]

修改下面两段代码

fontsize:function(a){switch(a){ case "四号": a="18px";break;case "小五": a="12px";break;case "小四": a="16px";break;case "小二": a="24px";break;case "小一": a="32px";break;case "五号": a="14px";break;case "小六": a="9px";break;case "六号": a="10px";break;}return this.toggle('<span style="font-size:'+a+';"></span>',{span:".font-size="+a,font:"size"})}

 

fontSizeTable,function(d,f){var text=f;switch(f){ case "四号": f="18px";break;case "小五": f="12px";break;case "小四": f="16px";break;case "小二": f="24px";break;case "小一": f="32px";break;case "五号": f="14px";break;case "小六": f="9px";break;case "六号": f="10px";break;}c.addItem({title:'<span style="font-size:'+f+';" unselectable="on">'+text+"</span>",height:t(f)+12,checked:a===f,click:function(){b.exec("fontsize",f).hideMenu()}})})});n("forecolor,hilitecolor".split(",")

你可能感兴趣的:(KingEditor,字体的)