How To Add Custom Styles To WordPress Visual Editor

WordPress allows theme developers to add their custom styles to WordPress editor. WordPress uses TinyMCE as their visual editor. You can easily link to your custom stylesheet by adding following code to your functions.php file:

Any CSS added to custom-editor-style.css file will be reflected within the WordPress’ visual editor.

Using Google Fonts

You can also use Google Fonts API to use Google Fonts on WordPress’ visual editor by adding following to your functions.php file:

Choosing Styles Based on Post Type

You can also use your custom editor stylesheets on based the post type being edited. Add following code in your functions.php file. This assumes the stylesheets with names in the form of editor-style-{post_type}.css are in your theme directory.