[wp-hackers] small change to link editor in post editor
James Tryon
james at easilyamusedinc.com
Wed Feb 2 17:13:57 UTC 2011
Do this with javaScript. It may not work all the time do to browsers having it turned off.
On Feb 2, 2011, at 11:44 AM, Andrew Gray <andrew at graymerica.com> wrote:
> 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
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list