WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Editor Style

Editor Style is a theme feature introduced with Version 3.0. This feature allows you to link a custom stylesheet file to the TinyMCE editor within the post edit screen. Apart from affecting the post content appereance in the editor, this will make the CSS class definitions from the file available in the Styles list box of the TinyMCE editor and able to be assigned to the content.

Adding Theme Support

There is no need to explicitly add theme support for this feature since support is added automatically when calling:

add_editor_style();

which will, by default, link the editor-style.css file located directly under the current theme directory.

If the support isn't automatically added you can add the theme support without fear of calling it twice.

To link a different stylesheet file, give its path relative to the current theme directory as an argument to the add_editor_style() function, like so:

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

More details

For more details about this feature and realistic examples of its usage, see the Description, Examples and Notes sections on add_editor_style() which, among others, cover behavior of the function related to the use of child themes and changes in previous versions of WordPress.

Resources

Related

Theme Support: add_theme_support(), remove_theme_support(), current_theme_supports()
Features: sidebar, menus, post-formats, title-tag, custom-background, custom-header, post-thumbnails, automatic-feed-links, html5, editor-style, content_width