Some times need to add custom classes in wordpress tinymce editor. This is simple solution to do this:
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 | add_filter( 'tiny_mce_before_init' , 'oi_tinymce' ); function oi_tinymce( $settings ) { $new_styles = array ( array ( 'title' => 'None' , 'value' => '' ), array ( 'title' => 'Table' , 'value' => 'table' , ), ); $settings [ 'table_class_list' ] = json_encode( $new_styles ); return $settings ; } |