[wp-hackers] small change to link editor in post editor
Andrew Gray
andrew at graymerica.com
Wed Feb 2 16:44:20 UTC 2011
All,
One of my clients is trying to change the default behavior of the editor.
Here is their request "All I am wanting is to have you pre-set any hyperlinks to open in a new window. In other words, instead of having the default target set to "Not set" like it currently is, please have it default to "Open Link a New Window" so that we do not have to make that extra step every time we hyperlink text"
Is this possible with a plugin or do I have to hack the core.
I have been able to add items to the target dropdown menu with the following in my functions.php. but no way to set the default to _blank.
function fb_change_mce_buttons( $initArray ) {
//@see http://tinymce.moxiecode.com/wiki.php/Configuration
$initArray['theme_advanced_link_targets'] = 'someframe=Some frame;otherframe=Some other frame';
return $initArray;
}
add_filter('tiny_mce_before_init', 'fb_change_mce_buttons');
thanks,
Andrew
More information about the wp-hackers
mailing list