Posted By

math89 on 04/17/10


Tagged

wordpress editor


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

tomcat23
BrianCoyDesign
mikoli
laurentzziu


Style WordPress editor using CSS


 / Published in: PHP
 

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

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

  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. }

Report this snippet  

You need to login to post a comment.