Display the Full TinyMCE Editor In WordPress

The WordPress visual editor was given a decent trim in version 3.9. It now has just 14 buttons, or 26 when the kitchen sink is enabled.

It looks great (I love minimalism) but sometimes less isn’t always more. Sometimes more is more. Really, I just want more.

So I set out to enable all of the buttons available in the visual editor.

In today’s Weekend WordPress Project, I’ll show you how to display more than the basic 14 buttons and also how to permanently show the buttons in the kitchen sink.

Feature image
Enable all the hidden buttons in TinyMCE with this Weekend WordPress Project.

Featured Plugin - WordPress Google Maps Plugin

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Displaying the Full TinyMCE Editor

The visual editor in the most recent version of WordPress displays fewer buttons than previous versions, even with the kitchen sink enabled.

Kitchen sink

To display the full TinyMCE text editor so you have access to all of the advanced features available, add the following code to your functions.php file to enable hidden buttons:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function enable_more_buttons($buttons) {

$buttons[] = 'fontselect';
$buttons[] = 'fontsizeselect';
$buttons[] = 'styleselect';
$buttons[] = 'backcolor';
$buttons[] = 'newdocument';
$buttons[] = 'cut';
$buttons[] = 'copy';
$buttons[] = 'charmap';
$buttons[] = 'hr';
$buttons[] = 'visualaid';

return $buttons;
}
add_filter("mce_buttons_3", "enable_more_buttons”);

To keep the kitchen sink always on, also add this snippet to your functions.php file:

1
2
3
4
5
6
7
add_filter( 'tiny_mce_before_init', 'myformatTinyMCE' );
function myformatTinyMCE( $in ) {

$in['wordpress_adv_hidden'] = FALSE;

return $in;
}

Your visual editor will now display a third row of buttons:

More buttons

Featured Plugin - WordPress Ecommerce Shopping Cart Plugin

Out of all the WordPress ecommerce plugins available, MarketPress has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more

TinyMCE Plugins

If you would rather not mess around with your code in your theme files, there are a few great plugins that add advanced TinyMCE functionality to the visual editor.Other features include graphical image mapping, the ability to create tables using an interface like Microsoft Excel, and a shortcodes manager.

TinyMCE Advanced

tinymce-advanced

TinyMCE Advanced allows you to add, remove and arrange the buttons in the visual editor. It includes 16 buttons for TinyMCE that are automatically enabled or disabled depending on what buttons are chosen.

Some of this plugin’s features include support for creating and editing tables, the ability to search and replace in the editor, editing inline CSS styles, and adding and removing HTML tag attributes.

WP Edit

wp-edit

WP Edit provides new buttons, extra options and extended formatting abilities not offered by the existing visual editor in WordPress.

This plugin allows you to easily insert images, video and clip art, create table via a graphical interface, access shortcodes and insert columns.

Comments (27)

  1. Great article. I agree. Less is more is normally best, but in this case, a little more would be better :)

    The code has an error that prevents it from working.
    In the line:

    add_filter(“mce_buttons_3″, “enable_more_buttons”);

    it should be

    add_filter(‘mce_buttons_3′, ‘enable_more_buttons’);

    Once I fixed that, it works great.

    Thanks for the tip!

  2. I tried the code (and the ‘corrected’ code from David Swanson) and it won’t work on FlexSqeeze themes.

    It just knocks out some features and lists the code in the header of the theme.

    Shame, would have been useful, too.

  3. Not sure if this goes beyond the scope of what you know/will do, but here’s my problem. Ever since the scale down of the editor, my theme’s shortcodes don’t work as they used to. Even if I go into the text editor of an older article, copy the shortcode (in this case, blockquote), and paste it into the text editor of a newly composed article, not all features are present (the light grey boxed background doesn’t show). The same happens with a dropcap. (Here’s an example of what my theme’s blockquote *should* look like: http://no-prop.com/talkin-mash-with-brooklyn-brewerys-andrew-gerson/)

    As it is now, the new default blockquote shortcode has zero resemblance to what used to output (thanks, WordPress!) — it’s tiny, not very pretty, and doesn’t have the larger open quote character my premium theme allows — and since I market my site as more than just a traditional blog, consistency in aesthetics is important.

    Oh, yeah. WP also removed the option to colorpick your font. So now I can’t highlight my hyperlinks in my site’s signature #b70000. Might sound nitpicky, but again, consistency is key. I installed TinyMCE Advanced, but it didn’t solve either of my major issues with this new pared down post editor.

  4. Hi I am using wordpress theme “Boquet” for my blog.
    I pasted the lines given in your section:
    “http://premium.wpmudev.org/blog/display-the-full-tinymce-editor-in-wordpress/”
    into the functions.php file and got the error message:
    ——————————–
    Parse error: syntax error, unexpected end of file, expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$

    (T_CURLY_OPEN) in /home/priscilla55/blog/wp-content/themes/bouquet/functions.php on line 557
    ——————————–
    The problem is I can’t find a way to get back into the editor
    to delete the lines I pasted in. Seems like the error message is giving me a clue to it, but I don’t know how to use that directory “/home/priscilla55/blog/wp-content/themes/bouquet/functions.php” .
    I am hosted by dreamhost.com. What would I put in front of the “/home … ” etc to get back into the functions.php file? (Or is that not even a way to get into it?)

    No matter what I try to view or go to in my wordpress blog now, I immediately get that same error message. The back button in my browser doesn’t take me back to the page where the editor was active/ open.
    HELP!

    THANK YOU!
    Priscilla

    • Hi Priscilla. I’m glad you were able to fix it! I was going to suggest exactly what you did. That’s the best way to test code with your theme and then reverting to your original files if something doesn’t work.

      I would suggest backing up your files if you want to make any other changes to your code, just in case something doesn’t work properly.

  5. Why make so much effort to “improve” TinyMCE when the CK Editor plugin is so much better?

    In the past I complained that CK was causing errors in processes such as inserting a video or audio on a page, and working with the media library in general.

    But all that went away when WP released version 3.8. With it, and subsequent updates including 3.9.1, CK plays nicely.

  6. Also the hint for the Plugin AddQuicktag, that allow to add custom buttons to the TinyMCE – http://wordpress.org/plugins/addquicktag/.

    @randy_hunt: Is not a good idea to add this source to the theme functions. Add this source to a plugin and you more control and it is easier to maintain. The www have a lot of posts about the difference functions.php inside the Theme and Plugins. Read about the difference and the benefits.

    Also you find a lot of nice answers on WordPress StackExchange to this topics, Theme vs. Plugin (http://wordpress.stackexchange.com/a/73157/170) and also to modify the TinyMCE.

  7. If you want a really easy way to turn on all those buttons without touching code, install the tinymceconfig plugin by Andrew Ozz. In settings enable the default tinymce and look at how the toolbars 1 and two are configured. Then click change on bar 3 and add all the button names in the code in this post separated by commas. Click Save and enjoy your new buttons. In the tinymce docs are a list of all the buttons available and there are more than just what is listed here as I remember.

Participate