WordPress 2.1 - More on those Editor Options
Posted on February 11, 2007
28 Comments
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...
-
/*
-
Plugin Name: Visualize Advanced Features
-
Plugin URI: http://www.solo-technology.com/blog/2007/02/11/wordpress-21-more-on-those-editor-options/
-
Description: Show the advanced options button all the time
-
Version: .01
-
Author: Chris Kasten, aka HandySolo
-
Author URI: http://www.solo-technology.com/blog/
-
License: Creative Commons Attribution-ShareAlike 2.5
-
http://creativecommons.org/licenses/by-sa/2.5/
-
*/
-
-
add_filter('mce_buttons', 'st_addAdvanced', 0);
-
-
function st_addAdvanced($buttons) {
-
return $buttons;
-
}
-
?>
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.
Tags: blog, editor, plugin, support, tip, WordPress, wysiwyg
Possibly Related Posts
Comments
28 Responses to “WordPress 2.1 - More on those Editor Options”
Leave a Reply



you’re my hero. I was going crazy wondering “where are the rest of the buttons?!” I couldn’t believe I saw no one else screaming about this sooner…
thanks
Annette - Hero!
Thank you kindly.
I tried putting that into a php file and uploading it to my plugins folder, but I couldn’t get it to work. Am I doing something wrong?
Hi Tom, I added proper opening and closing php tags to my little snippet above. See if that makes a difference?
w00t! Thank you for the plugin… it works great!!
Hi solo
with out plugin my button’s are not visable i thought this plugin will help me but still same problem
Nice plugin for those who need extra option
I tried in local system work well
Change the function to something a little less esoteric — simplicity rules the day:
function st_addAdvanced($buttons) {
$x=$buttons[21];
$buttons[21]=’wp_adv’;
$buttons[22]=$x;
return $buttons;
}
Lol! My weak php-fu is exposed yet again.
Mark, I think you’re on to something there but the example you gave causes me to lose the wp-adv button altogether.
Or maybe I need to see if it is still in the array with 2.1.1 …?
… or I’m a doofus and let Notepad mangle the single-quotes.
Fresh install, gotta find time to get Notepad++ back on here!
Works great!
Awww, man, I’m sorry. I totally didn’t mean it like that. Like I said, your thing wasn’t anything wrong … just … heavy-handed. *grin*
Glad it’s working. But, remember, yours worked, too.
Hey, I have a better idea — you call it 0.2 and drop my name and link in the credit.
Got a question for you, how do you get iG:Syntax Hiliter to not put blank lines in between the line number?
Mark - Stay tuned…
Joe - Just lucky I guess.
I don’t recall tweaking the CSS at all. Perhaps your theme has some stylesheet stuff impacting it?
Joe - Yikes! I went to have a look and your blog is empty!
Thanks… Its been doing that all day. Can’t figure out why though. All my other blogs are working fine. Should be back up in a minute.
I tried it on WP2.1.2, it shows nothing more on the Editor bar….
I assume you’re using the plugin linked at the top of this page? I promise, it works with 2.1.2.
After activating the plugin, you might need to refresh or clear your browser cache. With many browsers, ctrl-F5 is the shortcut to do that. Try it while on the Write Posts page and see what happens.
I’m also running WP 2.1.2 and having no luck with the extra buttons showing up. I installed the plugin on another blog I maintain that uses WP 2.1 and it is fine.
Ignore my last comment. I redownloaded the file and reinstalled it, now it works. Go figure.
Hi,
Thanks…
I fixed the problem, it was K2. I added one line to the CSS and everything is working fine.
Hi Mr. Solo again,
i worked tinymce into one of my sites some days ago. perfect! here“s my contribution-link to this post:
maxpower[DOT]ca/
how-to-add-buttons-to-
the-wordpress-editor-for-
your-plugin-theme/2006/10/28/
enjoy!
Hey Kaiser, thanks for sharing the link.
WordPress 2.3 adds a button that means you won’t need to remember this shortcut anymore