When I'm writing a new post and click the button to add a link to my text, it always defaults to 'Open in same window'. I'd like to change this to default to opening in a new window, so it's really just a matter of reversing these two options.
When I'm writing a new post and click the button to add a link to my text, it always defaults to 'Open in same window'. I'd like to change this to default to opening in a new window, so it's really just a matter of reversing these two options.
I ended up going to wp-includes/js/tinymce/themes/advanced/link.htm and finding the following lines:
<option value="_blank">{$lang_insert_link_target_blank}</option>
AND
<option value="_self">{$lang_insert_link_target_same}</option>
and I switched the 'blank' and 'same' sections of each line, essentially switching the order in which they appear.
Simple and it worked.
aar0on:
thats cool
i wanted to know that too
do you know how to give the new window attributes, like window size, position, etc
and even better, how to set a default window attributes?
alto
Actually, scratch what I just said in that last post. Here's the PROPER way to do it:
Open wp-includes/js/tinymce/themes/advanced/link.htm and finding the following lines:
<option value="_self">{$lang_insert_link_target_same}</option>
AND
<option value="_blank">{$lang_insert_link_target_blank}</option>
***All you have to do is switch them in their order, so they should look like this:
<option value="_blank">{$lang_insert_link_target_blank}</option>
<option value="_self">{$lang_insert_link_target_same}</option>
That's it!
Another thing I did was go to wp-includes/js/tinymce/themes/advanced/jscripts/link.js and opened it in Notepad. Find line:
href.value = tinyMCE.getWindowArg('href') || 'http://';
and change it to:
href.value = tinyMCE.getWindowArg('href') || '';
Now you won't have to highlight the http:// before you paste a link.
Another way to make "Open Link in a NEW Window" the default is to edit the line:
from:
<option value="_blank">
to:
<option value="_blank" selected="selected">
So "_blank" now becomes the SELECTED default for the drop down list. Same as what aar0on said, only without changing the order of the options.
Hi, I consider deliot version cleaner ... have posted about it.
This topic has been closed to new replies.