I've created a button (named 'quote') in WordPress post editor (TinyMCE) normal mode, and I've been successful in adding some functionality to that button. The question is how can I make this button also appear in the 'full screen mode editor' (also known as Distraction Free Writing Mode).
functions.php:-
add_action('init', 'add_button');
function add_button() {
if ( current_user_can('edit_posts') && current_user_can('edit_pages') )
{
add_filter('mce_external_plugins', 'add_plugin');
add_filter('mce_buttons_3', 'register_button');
}
}
function register_button($buttons) {
array_push($buttons, "quote");
return $buttons;
}
function add_plugin($plugin_array) {
$plugin_array['quote'] = get_bloginfo('template_url').'/js/customcodes.js';
return $plugin_array;
}
I've googled and found that I might have to add some sort of filter. WordPress filters out buttons in the Full Mode, so I've to add the button again to the $buttons array. I believe that I'm pretty close to it.