Custom TinyMCE Editor Formats in Dropdown
You can group styles using the items key – you can nest multiple times too! /* TINY MCE FORMATE */ function my_mce_before_init_insert_formats( $init_array ) { $style_formats = array( array( ‘title’ => ‘Buttons’, ‘items’ => array( array( ‘title’ => ‘Green’, ‘selector’ => ‘a’, ‘classes’ => ‘btn–green’ ) array( ‘title’ => ‘Blue Button’, ‘selector’ => ‘a’, ‘classes’ … Read more