Skip to content


Customizing WordPress visual editor

WordPress toolbarIf you would, like me, like to customize the WordPress toolbar, you can do so. It is burried deep down in wp-includes, but it can be done to some extent. WordPress uses TinyMCE editor, but it is customized. The architecture is not so clean, so I am not sure how to fully customize it. You can add your own toolbars etc, but I suggest extending it with what was “intended”. So, what do you get? Additionally, you get to choose the type of text (paragraph, heading 1-6, preformated and address), you get to justify text, choose font color, paste from word, insert custom character and you get undo/redo buttons.

Update:  See this post and this forum thread for alternatives. You can also switch it on/off with Alt-V shortcut (firefox: Alt-Shift-V).

So, how to do it? Simple. You can replace your tiny_mce_config.php file with the one I have, or you can edit yours. It is really simple.

  1. Open your tiny_mce_config.php file. It is located in [WordPress install]/wp-includes/js/tinymce/ folder.
  2. Edit the line 57 of the file, so that you change this
  3. theme_advanced_buttons1 : "<?php echo $mce_buttons; ?>",
  4. to that
  5. theme_advanced_buttons1 : "<?php echo $mce_buttons; ?>, wp_adv",

Do not forget the commas. What this does is adds additional icon to your toolbar. By pressing this “toolbar” icon, second toolbar will be shown. You can move the wp_adv to the front as well, meaning that the button will be shown as the first button on the toolbar.

BTW, this is for WordPress 2.1

You can play more with this tinyMCE initalization: theme_advanced_buttons[1-3] are for toolbars. They are somehow filtered in the end, but basically you say which buttons you want on your toolbars.

Posted in general, software.