TinyMCe toolbar customisation
-
Hi,
I’m trying to customise the toolbar in TinyMCE.Initially I just enabled the advanced one:
function bbp_enable_visual_editor( $args = array() ) { $args['tinymce'] = true; $args['teeny'] = false; $args['quicktags'] = false; return $args; } add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );
I thought of adding a button for underline and it led to trying to get only what I needed in one toolbar:
function bbp_enable_visual_editor( $args = array() ) { $args['tinymce'] = array('toolbar1' => 'formatselect, bold, italic, underline, bullist, numlist, blockquote, alignleft, aligncenter, alignright, link, strikethrough, forecolor, outdent, indent, undo, redo'); $args['quicktags'] = false; $args['teeny'] = true; return $args; } add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );
This is causing it to repeat some things in toolbar 2 (as well as the ability to toggle toolbar 2 on and off). I tried adding toolbar 2 to the code above, but then it goes back to default. I could stop there though and just add underline and the tools that’s in toolbar 1 by default, but I’m curious if I can customise things further.
To my question:
Is there a way to add everything in one toolbar and then disable toolbar 2?
Or is there a way to get the toogle for toolbar 2 back when I’ve customised toolbar 1?I also tried enabling teeny which would’ve worked best, but then I lose the forecolor toolbar box so I’d need a way to add it back.
Thanks in advance
- You must be logged in to reply to this topic.