Customize WordPress WYSIWYG Editor, it works!
Found a need for this today for a client site, wanted to share, shoutout to Frank the author! Original post here: http://wpengineer.com/1963/customize-wordpress-wysiwyg-editor/
Adjustments to the editor TinyMCE via hook, so regardless of the core files of WordPress is also possible and must be used in a number of requirements. So in this article are some examples that can be adapted to its needs and should give an introduction of customizing the TinyMCE editor in WordPress.
You put the following code snippet in the functions.php of the theme or stores it into a Plugin. There are a whole range of possibilities and I would like to show only a small range of them. Adjusting the buttons is quite comfortable to do via the Plugin TinyMCE Advanced.
Adjust HTML-Filter
The default editor is set to always generate xHTML 1.0 and thus not all tags are allowed; a classic example are iframes, which you use for Google Map for example. Sure there are other approaches via short code, etc., but this is not the today topic. Merely as an example, allowing the tag iframe, with various attributes, and the Tags must be added to the variable $ext.
// Comma separated string od extendes tags
// Command separated string of extended elements
$ext = ‘pre[id|name|class|style], iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]‘;if ( isset( $initArray['extended_valid_elements'] ) ) {
$initArray['extended_valid_elements'] .= ‘,’ . $ext;
} else {
$initArray['extended_valid_elements'] = $ext;
}
// maybe; set tiny paramter verify_html
//$initArray['verify_html'] = false;
return $initArray;
}
add_filter(‘tiny_mce_before_init’, ‘fb_change_mce_options’);
Customizing the function of the buttons in your Editor
A way to expand the block formats (theme_advanced_blockformats) or modify and disable a few buttons in your editor (theme_advanced_disable).

//@see http://wiki.moxiecode.com/index.php/TinyMCE:Control_reference
$initArray['theme_advanced_blockformats'] = ‘p,address,pre,code,h3,h4,h5,h6′;
$initArray['theme_advanced_disable'] = ‘forecolor’;return $initArray;
}
add_filter(‘tiny_mce_before_init’, ‘fb_change_mce_buttons’);