WYSIWYG Button Manager for WordPress

March 19th, 2007 @ 8pm : 30 comments : Socialize This
Filed Under: Tags: ,

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.

30 Responses to “WYSIWYG Button Manager for WordPress”

  1. kilbot Says:

    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!

  2. Paul Menard Says:

    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.

  3. Internet Vibes » Blog Archive » WYSIWYG Button Manager for WordPress Says:

    [...] You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your ownsite. [...]

  4. WP Plugins DB » Blog Archive » WYSIWYG Button Manager Says:

    [...] Visit [...]

  5. Dave Burnham Says:

    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.

  6. Paul Menard Says:

    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.

  7. Chris Says:

    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!

  8. Paul Menard Says:

    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

  9. Chris Says:

    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

  10. Chris Says:

    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.

  11. Roman Says:

    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 :(

  12. Sonika’s blog » Визуальный редактор в WordPress: часть 2. Обзор плагинов Says:

    [...] WYSIWYG Button Manager for WordPress [...]

  13. http://remont-komplekt.ru/ Says:

    Àêòóàëüíàÿ òåìà. Íàïèñàíîå äîñòîéíî âíèìàíèÿ.

  14. Гангстерито Says:

    привет. Админ, хошь прикол ? :D к тебе на сайт можна заходить через яндекс :)
    yandex.ru/redir?url=www.codehooligans.com

  15. Erolonilmonem Says:

    Админчег :) У меня к тебе небольшое предложение, хоть и не по теме блога ;) Напиши пожалуйста свой обзор передачи Гордон Кихот. Особенно прошлый выпуск, про Шансон.

    Спасибо :) Удачи дружище

  16. Байкал Says:

    С праздничком всех))) Празднуете уже?))

  17. Прошу-Внимания Says:

    http://www.codehooligans.com, админ. Кто писал про последнее китайское предупреждение ? Извини. Я надеюсь мы найдем компромисс ? 1. Поставь на блог-комментирование хорошую каптчу. 2. Пошли урлы своих блогов сюда chezanah@gmail.com и ты избавишься от меня. Ещё раз приношу извинения. издержки производства…

  18. Puhunlalm Says:

    Отличные новости, так держать, удачи в будущем.

  19. Puhunlalm Says:

    Стоит ли ждать обновления?.

  20. Puhunlalm Says:

    Могу предложить много инфы по данной теме, нужно?.

  21. Puhunlalm Says:

    Как часто публикуете новости по данной тематике?.

  22. Казимир Says:

    Я тоже в блоге про такое пишу, только на тему кино

  23. Cederash Says:

    ?? ????? ????? ???? ??????? ??????, ?? ?????? ???????!

  24. gigacak Says:

    ???????. ??? ?? ?????? ??? ?? ???? ??????!)

  25. gosahot Says:

    ??????? ? ???? ????????. ?????? ???? ??? ??????? ?????? ??????!

  26. rylocul Says:

    ??????? ??? ?? ????, ????? ???????? ??????, ??? ????? ????????

  27. Avertedd Says:

    ????? ?????? ??? ??????????, ???????.

  28. Yorikk Says:

    ????? ???????? ????, ???????!!

  29. Olegreze Says:

    ???????? ?????? ??????? — ?????? ?????? ?? ??????? ?????????????!

  30. ?????? Says:

    thank you, guys!

Leave a Reply