I suppose that
add_filter( 'bbp_get_teeny_mce_buttons',
should be
add_filter( 'bbp_get_teeny_mce_plugins',
Check out https://codex.bbpress.org/enable-visual-editor/
Pascal.
Thank you for the response. I tried that as well, since I’m adding the “paste” plugin with the following code (with an array print for debugging):
add_filter( 'bbp_get_tiny_mce_plugins', 'fx_tinymce_paste_plain_text' );
function fx_tinymce_paste_plain_text( $plugins = array() ) {
$plugins[] = 'paste';
$plugins[] = 'code';
print_r($plugins);
return $plugins;
}
But what I get is the following — no buttons. (you can see the $plugins array contents):
If I remove the “$plugins[] = code;” line — I get the buttons back:
I’m not seeing any errors in php.log — so I must be doing something wrong. I’m curious if it is because a code button can’t be there without the dropdown menu. Or maybe I need to show the quicktags part of the visual editor
hmmm, can you try
function fx_tinymce_paste_plain_text( $plugins = array() ) {
array_push($plugins,"paste","code");
print_r($plugins);
return $plugins;
}
Pascal.
ha, now I see the print_r at the bottom… seems to be correct anyway !!
I must be missing something, but I don’t see what
EDIT: colorpicker, lists, … ??? Can you change $plugins with $buttons ?
I’ve also set it up so adding a button AND plugin for “code” are hooked in, but still no luck.
Good idea to try some other plugins/buttons to try and debug this…