Customising the WordPress TinyMce editor and it's buttons
I'm trying to cutomise the TinyMce editor within WordPress and I took this code from an older WP site I did, but the buttons I have set don't seem to be working, for example, this is what I have:
add_filter( 'tiny_mce_before_init', 'blm_format_tiny_mce' );
function blm_format_tiny_mce( $in ) {
$in['remove_linebreaks'] = true;
$in['convert_newlines_to_brs'] = false;
$in['keep_styles'] = true;
$in['tabfocus_elements'] = 'major-publishing-actions';
$in['paste_remove_styles'] = false;
$in['paste_remove_spans'] = true;
$in['paste_strip_class_attributes'] = 'mso';
$in['paste_text_linebreaktype'] = 'combined';
$in['plugins'] = 'tabfocus,paste,media,fullscreen,wordpress,wpeditimage,wpgallery,wplink,wpdialogs';
$in['theme_advanced_buttons1'] = 'formatselect,forecolor,|,bold,italic,underline,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,justifyfull,|,link,unlink,|,wp_adv';
$in['theme_advanced_buttons2'] = 'pastetext,pasteword,selectall,removeformat,|,charmap,|,outdent,indent,|,undo,redo';
$in['theme_advanced_buttons3'] = '';
$in['theme_advanced_buttons4'] = '';
//$in['valid_children'] = '+div[p]';
return $in;
}
Now, even though I have bullist,numlist
listed, I don't see them on the editor; however I see strikethrough
even though it's not listed.
The only two other ones missing are horizontal line
and special character
; on top of that they don't show up in the order I put them, the order seems somewhat random.
I'm happy to just not set the buttons, as with this site it's ok if everything is available, but I thought I needed to use it to insert the plugin buttons such as pastetext,pasteword,selectall
?
What am I doing wrong here?
Topic plugin-tinymce tinymce visual-editor Wordpress
Category Web