WYSIWYG Button Manager for WordPress
Have you ever managed a large list of content authors on a WordPress site? Ever want to allow certain authors to use more advanced WYSIWYG editor functionality? Keep reading.
Problem
As most users of WordPress 2.x and 2.0.x are aware WordPress come with a very small list of the editor buttons enabled. In order to enable these other buttons you had to open a file (tiny_mce_gzip.php) and add the buttons manually. Now editing the php file is fine for most programmers or folks familiar with WordPress. but for the average user this might be a hard task. Another problem with this option is you are in fact enabling the buttons for all users. If you happen to manage a site with a large list of authors you may want to only allow more advanced WYSIWYG buttons for the authors you trust.
Solution
Announcing the beta version of the WYSIWYG Button Manager for the TinyMCE Editor that comes as part of WordPress. This plug-in allow an administrator user to define WYSIWYG Panels. Each Panel is a set of three rows of allowed buttons. Via this plug-in you can define each button row custom to the users needs. Simple.
So how does this plug-in work? All WYSIWYG Panels are stored as a data structure (array) into the wp_options table. the key for this options record is ‘WYSIWYG_button_manager_data’. when you associate the Panel with the user a new usermeta record is added to the wp_usermeta table. The key for these records are ‘WYSIWYG_panel’.
When the user goes to edit/author an entry a couple of filters are called from WordPress. These filters are ‘mce_buttons’, ‘mce_buttons2′ and ‘mce_buttons3′. If you have defined a Panel that contains any buttons then these will be used over the default WordPress buttons. Really this only overrides the first ‘mce_buttons’ since this is the only variable defined via WordPress. The second and third row are left blank.
Testing
I’ve installed this plug-in into three version of WordPress. I know this plug-in will work with version 2.0.2, 2.0.5 and the latest SVN nightly grab.
Download
The beta version of this plug-in can be downloaded here
Problems
If you use this plug-in and have any problems please do not hesitate to contact me.
Installation
Drop the unzipped file into your wp-content/plugins folder. Via the WordPress Admin interface navigate to the Plugins page. Activate the plug-in. you should see a new menu under the Manage section ‘WYSIWYG Manager’. Only Admin-level users will see this options.
Future
As mentioned this is only a beta version. It’s functional but lacks some of the ‘bling’ options in today’s web 2.0 interfaces. I’d like to provide a complete list of dragable buttons to the user and let them build the editor rows instead of needing to type in the button name. Other ideas include making this plug-in aware of external MCE plug-ins used.
You can leave a response, or trackback from your own site.



April 19th, 2007 at 3:15 am
Hey, great plugin!
I install Wordpress as a CMS for a lot of clients and need to customise the rich text editor to suit the desired formatting options for the site. Using your plugin in I was able to throw out stuff they didn’t need, add the styles drop down and the tables plugin and they’re good to go.
Wordpress really has a long way to go to integrate the full features of Tiny MCE, but your plugin make my life much easier.
Cheers!
April 19th, 2007 at 6:01 am
Thanks kilbot. I’ve had user who emailed that the plugin breaks keyboard access. There does appear to be an issue. For example Alt+Shift+U no longerworks. I’m looking into this and hope to have a fix soon.
May 6th, 2007 at 10:41 am
[…] You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your ownsite. […]
May 20th, 2007 at 1:58 am
[…] Visit […]
May 24th, 2007 at 10:36 pm
Looks like a great plugin… unfortunately while it activates fine and I can create custom panels, nothing changes with regards to what’s displayed in TinyMCE. I still get the Wordpress default. I’m running Wordpress 2.2 — has anyone else got this working with that version?
Paul, I’m happy to provide some debugging information. Just tell me what would be useful. I’ve already tried deactivating all my other plugins.
May 25th, 2007 at 11:59 am
Dave, I installed the latest WP 2.2 on my laptop. Setup it up, installed the plugin (fresh downloaded from WP.org). Setup a simple WYSIWYG panel, assigned it to the admin account. Went into Write -> Post and the buttons from the new panel were displayed.
Just a note. I’ve needed to force refresh in the browser (shift-reload) sometime when creating new WYSIWYG panels. This is not all the time. Just sometimes. I’m not sure I can force a cache clear via the plugin.
If this still does not work foor you let me know. And if you can pass me your WP version, browsers tested in, etc.
July 1st, 2007 at 7:16 pm
This is a great plugin - easy to install and use. Thanks. But … anyone have trouble with IE and the color picker? When I choose a color, it opens a blank page with javascript:selectColor(); This happens in IE only, not firefox. I’m using Wordpress v2.0.5. Appreciate any help here - I would really love to offer a user the ability to chose text and background color, but I can’t seem to get it working!
July 1st, 2007 at 8:38 pm
Hey Chris, thanks for the compliment. The under-working of the plugins doesn’t really do anything but enable the display of the WYSIWYG buttons. The functionality of the buttons is not managed or controlled by the plugin.
If you look at the file /wp-includes/js/tinymce/tiny_mce_gzip.php (WP 2.0.4) around line 142-144 you should see the lines:
142 theme_advanced_buttons1 : “< ?php echo $mce_buttons; ?>“,
143 theme_advanced_buttons2 : “< ?php echo $mce_buttons_2; ?>“,
144 theme_advanced_buttons3 : “< ?php echo $mce_buttons_3; ?>“,
The first variable is pre-defined by WP core. All I’m doing from my plugin is setting and overriding the them_advanced_buttons.
Still I’ll see if I can find an IE browser to check this. You never know.
Paul
July 2nd, 2007 at 11:55 am
Yes, I’m sure you are right - it’s not your plugin at fault. But I’d love to find an answer to this - I wondered if anyone else has run into the same problem with wordpress? Thanks.
Chris
July 4th, 2007 at 11:36 am
OK I finally figured this out - so I will post my results here in case anyone else runs up against the same thing.
I got the color picker working without the 404 javascript window. Here’s what it took for me:
wordpress 2.0.5, tinymce version which came with it
color_picker.htm from tinymce version 2.0.8
The critical point is the addition of this line in the head of this file, right after the javascript:
Now it works beautifully in IE and firefox.
I tried tinymce 2.0.8 (the whole folder) but it breaks the wysiwyg editor in wordpress. Just the one file was all I needed from it.
Hope this helps someone.
September 16th, 2007 at 5:27 am
It seems a nice plugin but unfortunately doesnt work for me. When I enter to the manager page it shows only the list but no layout for to creating own style panel :(…
March 29th, 2008 at 7:16 am
[…] WYSIWYG Button Manager for WordPress […]