Style WordPress editor using CSS


/ Published in: PHP
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. add_filter('mce_css', 'my_editor_style');
  2. function my_editor_style($url) {
  3. if ( !empty($url) )
  4. $url .= ',';
  5. // Change the path here if using sub-directory
  6. $url .= trailingslashit( get_stylesheet_directory_uri() ) . 'editor-style.css';
  7.  
  8. return $url;
  9. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.