Add custom styles to visual editor Wordpress


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

A little function to add custom styles to the tinymce editor in wordpress.


Copy this code and paste it in your HTML
  1. // Add custom CTA styles to TinyMCE editor
  2. if ( ! function_exists('tdav_css') ) {
  3. function tdav_css($wp) {
  4. $wp .= ',' . get_bloginfo('stylesheet_directory') . '/css/tinymce.css';
  5. return $wp;
  6. }
  7. }
  8. add_filter( 'mce_css', 'tdav_css' );

URL: http://wordpress.org/support/topic/how-do-i-add-custom-stylesheets-to-tinymce

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.