开发者

WordPress WYSIWYG Editor Font

I'm looking for the stylesheet that contains the font style CSS for the WYSIWYG editor in WordPress' admin area. Currently, in Visual editing mode, the font displays as Georgia. However, the body copy in the front end if Helvetica. My client is getting "confused" when they see the Georgia, and would rather see 开发者_运维百科the copy in the WYSIWYG in Helvetica.

How can I apply new styles to the WYSIWYG editor?


You want to use the WordPress function add_editor_style() to include another CSS file for TinyMCE (the WYSIWYG editor you're referring to). The function takes one parameter - the name of the CSS file relative to the root directory of the current theme. For example:

add_editor_style('css/custom-editor.css');

You can then add CSS styles to that file, such as the following:

* {
    font-family: 'Helvetica', 'Arial', sans-serif;
}

Which will change the font to Helvetica, as you mention. There's more detail here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜