Return to Snippet

Revision: 26046
at April 17, 2010 03:51 by math89


Initial Code
add_filter('mce_css', 'my_editor_style');
function my_editor_style($url) {
  if ( !empty($url) )
    $url .= ',';
  // Change the path here if using sub-directory
  $url .= trailingslashit( get_stylesheet_directory_uri() ) . 'editor-style.css';

  return $url;
}

Initial URL
http://azaozz.wordpress.com/2010/01/02/can-themes-style-the-visual-editor/

Initial Description
All it takes is a stylesheet and a small function in the theme’s functions.php file

Initial Title
Style WordPress editor using CSS

Initial Tags
wordpress

Initial Language
PHP