the code bellow seems not working anymore
function enable_more_buttons($buttons) {
$buttons[] = ‘hr’;
$buttons[] = ‘fontselect’;
$buttons[] = ‘sup’;
// etc, etc…
return $buttons;
}
add_filter(“mce_buttons”, “enable_more_buttons”);
this is not working too
function myplugin_addbuttons() {
// Don’t bother doing this stuff if the current user lacks permissions
if ( ! current_user_can(‘edit_posts’) && ! current_user_can(‘edit_pages’) )
return;
// Add only in Rich Editor mode
if ( get_user_option(‘rich_editing’) == ‘true’) {
add_filter(“mce_external_plugins”, “add_myplugin_tinymce_plugin”);
add_filter(‘mce_buttons’, ‘register_myplugin_button’);
}
}
function register_myplugin_button($buttons) {
array_push($buttons, “separator”, “myplugin”);
return $buttons;
}
// Load the TinyMCE plugin : editor_plugin.js (wp2.5)
function add_myplugin_tinymce_plugin($plugin_array) {
$plugin_array[‘myplugin’] = URLPATH.’tinymce/editor_plugin.js’;
return $plugin_array;
}
// init process for button control
add_action(‘init’, ‘myplugin_addbuttons’);
I want to find out too, please, if anybody has a solution.
I need to add a new button to tinimce, with a custom style.
And another related question: the style I’m adding should it be in the tiniymce css file or my theme’s css file?
Thanks!
I have found this on WP Codex.