Add custom css class to wordpress wysiwyg editor

To add class to wordpress wysiwyg editor copy this php code to your theme function.php file

if ( ! function_exists('tdav_css') ) {
	function tdav_css($wp) {
		$wp .= ',' .get_bloginfo('stylesheet_directory') . '/style_css.css';
	return $wp;
	}
}
add_filter( 'mce_css', 'tdav_css' );

Here you add new style file. In this file create your new css classes. Now go to wysiwyg editor and there you will see your created classes. Use them for table or links. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *