Support

Account

Forum Replies Created

  • I’ve tried the code below. But this just returns the Full toolbar without the desired extra dropdown menu.

    add_filter( 'acf/fields/wysiwyg/toolbars' , 'my_toolbars'  );
    
    function my_toolbars( $toolbars ) {
    	$style_formats = array(  
    		array(
    			'title' => 'My style',
    			'block' => 'span',
    			'classes' => 'mystyle',
    			'wrapper' => true,
    		),
    	);
    
    	$toolbars['My toolbar'] = $toolbars['Full'];
    	$toolbars['My toolbar'][1]['styleselect'] = json_encode( $style_formats );
    
    	return $toolbars;
    }
  • Ah, I see, yeah. So it replaces the Full toolbar instead of expand it with an extra button.
    Is there also a way to create a new toolbar that equals the Full toolbar + the extra dropdown menu? Or do you have to repeat all the Full menu options for this as part of the new toolbar?

Viewing 2 posts - 1 through 2 (of 2 total)