WordPress 2.1 – More on those Editor Options

Update: Plugin Released

A week and a half ago I wrote an article about the "hidden" advanced features in the WordPress 2.1 wysiwyg editor. I mentioned the support forum thread where I learned about this and there has been some interesting discussions there recently.

I wondered if I could at least get the button to toggle the toolbar to show up all the time -- without modifying core files. I don't want the advanced bar there all the time, but I thought it would be cool to show the toggle to make it easier for more browsers/platforms to get at it.

A quick peek at the Plugin API/Hooks documentation shows that there are some mce hooks (TinyMCE is what is used for the wysiwyg editor).

[updated!] Ignore this tripe. Check out Mark Steel's comment below for a proper function

I have the beginnings of something interesting now, but it isn't quite perfect...

PHP:
  1. /*
  2. Plugin Name: Visualize Advanced Features
  3. Plugin URI: http://www.solo-technology.com/blog/2007/02/11/wordpress-21-more-on-those-editor-options/
  4. Description: Show the advanced options button all the time
  5. Version: .01
  6. Author: Chris Kasten, aka HandySolo
  7. Author URI: http://www.solo-technology.com/blog/
  8. License:  Creative Commons Attribution-ShareAlike 2.5
  9. http://creativecommons.org/licenses/by-sa/2.5/
  10. */
  11.  
  12. add_filter('mce_buttons', 'st_addAdvanced', 0);
  13.  
  14. function st_addAdvanced($buttons) {
  15. unset($buttons[22]);
  16. array_push($buttons, 'wp_adv');
  17. return $buttons;
  18. }
  19. ?>

Toss that in a .php file, lob it into your plugins directory and activate it.
Visit the Write Posts screen and you'll see a new button at the right end. Clicking it shows the advanced toolbar! However, my button then gets moved to a 3rd row. Obviously, I have some layout issues.

If you can improve it, run wild and drop a link here to your improved version.

Possibly Related posts:

  1. WordPress 2.1 – More Editor Options
  2. First Release: Visualize Advanced Features
  3. Couple WP Plugins
  4. Humility and building a WordPress Plugin
  5. WordPress Plugin Directory


28 comments to WordPress 2.1 – More on those Editor Options

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>