Support

Account

Home Forums Backend Issues (wp-admin) How to add a button to ACF tiny MCE editor

Solving

How to add a button to ACF tiny MCE editor

  • How can i add a button to ACF WYSIWYG editor ( for example ‘text color’ button ). i tried this code but it doesn’t work 🙁

    add_filter( 'acf/fields/wysiwyg/toolbars' , 'dw_add_buttons_to_acf_wysiwyg_editor'  );
    function dw_add_buttons_to_acf_wysiwyg_editor( $toolbars ){
        $toolbars['Full'][2][] = 'forecolor';
    
        return $toolbars;
    }
  • this code

    function my_mce_buttons_2($buttons) {	
    	/**
    	 * Add in a core button that's disabled by default
    	 */
    	$buttons[] = 'superscript';
    	$buttons[] = 'subscript';
    
    	return $buttons;
    }
    add_filter('mce_buttons_2', 'my_mce_buttons_2');

    from the codex worked for me

  • Thanks for your reply but it’s not working 🙁
    I think i figured out the problem , textcolor plugin should be included in order to use ‘forecolor’ :
    http://www.tinymce.com/wiki.php/Plugin:textcolor

    But my new question is how to include textcolor plugin to the editor 😀

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

The topic ‘How to add a button to ACF tiny MCE editor’ is closed to new replies.