Well, I found the answer thanks to Dan's prompt. Here's how to do it:
First (as Dan suggested), see how they add the Gallery plugin to the Tiny MCE. There is actually an uncompressed js file that will give you the overview you need, find it in:
/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js
This covers the basics of adding this type of plugin to TinyMCE ( more info here ). To get WP to download the .js file using the TinyMCE plugin, see This Useful Guide .
Basically here is the code:
if ( get_user_option('rich_editing') == 'true') { add_filter("mce_external_plugins", "add_jolokia_tinymce_plugin"); //Applying the filter if you're using the rich text editor } function add_jolokia_tinymce_plugin($plugin_array) { $plugin_array['example'] = '/path/to/example.js'; return $plugin_array; }
Add this to a plugin or feature. php in the subject And you are good!
Mojowen
source share