WordPress is a very popular blog system,The advantage is to be used to make full-featured CMS ......
But the disadvantage Well,May be too simple editor is one of the background。
Although it supports the Chinese do very well,But for this one editor,I am afraid it is not so tough。For example, not criticized for our common font options,Nor can you change the text size,Instead, it is the title Ratings,As the body,Only "paragraph" such a default option。
The benefit is the ability to naturally and are compatible with a variety of subjects,Because all of the labels are defined in the format of the current theme among the style.css file,The text,You only need to define a label is enough。But I am afraid that the majority of the Chinese users do not like such a simple setting,In this case you need to WordPress TinyMCE editor that comes with some enhanced (not so much enhance the,As it is about its anti-customization,The default WordPress hidden features deceives back! )
To recommend a widget:TinyMCE Advanced
This plug-in interface is very simple,Functions as an,让你能够全面定制 TinyMCE 的完整功能!使用插件的设置页面,By simply dragging you can edit and arrange all function buttons,This code was added buttons more convenient than the,Also more beautiful,Although more than a plug-in,But compared buttons to arrange each time the wonderful work of editing the article to make you feel uncomfortable speaking,Also vindicated。
Adding Chinese Fonts
After installation and commissioning good plug,You will find,Everything was perfect,But - the font is in English ah!
Yes, that's right,Yes,TinyMCE default Chinese font is no alternative,But it is supported,We just need to add TinyMCE menu which can be。
Taking into account the future plug-in upgrade,You can also upgrade WordPress Theme,Then your changes will be destroyed,So routing is recommended that you useSubtopicsWay to add modifications to TinyMCE。
In short,We add the following statement function.php document to the current theme in the Font menu of TinyMCE into Chinese (codes fromRobins blog):
1 2 3 4 5 |
function custum_fontfamily($initArray){ $initArray['font_formats'] = "微软雅黑='微软雅黑';宋体='宋体';黑体='黑体';仿宋='仿宋';楷体='楷体';隶书='隶书';幼圆='幼圆';"; return $initArray; } add_filter('tiny_mce_before_init', 'custum_fontfamily'); |
Original article written by LogStudio:R0uter's Blog » WordPress Editor to increase the Chinese font TinyMCE Advanced plugin
Reproduced Please keep the source and description link:https://www.logcg.com/archives/947.html
I still can not add Chinese,I do not know the code。In function.php Which place? I added in the bottom,But useless
Location is no problem,To determine the add theme being used function.php file。