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 π