Note: Please note that this page/code is only geared towards TinyMCE v2x. The bad news is, that TinyMCE v3 comes with a new infrastructure to support custom plugins which renders this example useless.
The good news however are that the TinyMCE v3 plugin support is much better and easier to use, so my work really isn't needed anymore - just take a look at TinyMCE documentation - it's pretty self-explanatory.
I don't know how many hours I spent searching the WORLD WIDE trying to finding proper and easy to digest resources that would help me in creating my own buttons (& functionality) to enhance the WYSIWYG editor for Wordpress (v2.1 that is).
If you're also frequently using custom code pieces inside your posts or simply are looking for a way to have one-click shortcuts to apply certain styles (and/or code) to your text without leaving the WYSIWYG editor then this zipped package might be just for you.
This not meant to be a detailed guide, but a clear (no fuss) and compact starting point to creating your own little buttons in TinyMCE. Most of it is pretty much self-explanatory, if you run into any issue let me know maybe I can help out. For more fancy logic check out the other packaged plugins that come with a full TinyMCE release, they contain good code snippets.
Installation
Unzip this custom TinyMCE plugin into your tinymce plugins folder, usually at /wp-includes/js/tinymce/plugins/
Modify tiny_mce_config.php (in /wp-includes/js/tinymce/) and let TinyMCE know about the new plugin:
$plugins = array('dd','inlinepopups', .....
Also, you need to specifically include the two new buttons by modifying this line:
$mce_buttons_2 = apply_filters('mce_buttons_2', array('dd_step','dd_note',...
Clear your browser cache and reload your WP New Post page
Once you got it running, you can start changing the code to do what you need it to do
Download
another example: highlighting code in your posts (readme included)














This is an amazing plugin/addon that you have put together. Thank you very much for sharing it. You have brought my hours of toiling to an end.