Hi Andrew,
The custom styles are not being applied to all instances of the editor both within Tailor and otherwise. I’ve also tested without the TinyMCE Advanced plugin enabled as well.
// Add button for Custom Style Formats to TinyMCE Editor
add_filter( 'mce_buttons_2', 'slate_mce_buttons' );
function slate_mce_buttons( $buttons ) {
array_unshift( $buttons, 'styleselect' );
return $buttons;
}
// Add Style Formats to TinyMCE Editor
add_filter( 'tiny_mce_before_init', 'slate_mce_before_init' );
function slate_mce_before_init( $settings ) {
$style_formats = array(
// some sample styles for example
array(
'title' => __( 'Headlines', 'slate' ),
'items' => array(
array(
'title' => __( 'Underline', 'slate' ),
'selector' => 'h2',
'classes' => 'underscore'
),
array(
'title' => __( 'Split', 'slate' ),
'selector' => 'h2',
'classes' => 'split'
),
),
),
array(
'title' => __( 'Separators', 'slate' ),
'items' => array(
array(
'title' => __( 'Tapered', 'slate' ),
'selector' => 'hr',
'classes' => 'taper'
),
array(
'title' => __( 'Inset', 'slate' ),
'selector' => 'hr',
'classes' => 'inset'
),
array(
'title' => __( 'Decorative', 'slate' ),
'selector' => 'hr',
'classes' => 'decorative'
),
),
),
);
$settings['style_formats'] = json_encode( $style_formats );
return $settings;
}