I almost always select "Open link in new window" when creating an URL/HREF. Is there any way to default this choice.
Even if it requires a small source code change, I think it would be worthwhile (if someone can tell me where that might be.)
It seems TinyMCE provides no easy setting to select a default value. But there is another backdoor: the
You can create a WordPress plugin for this, so it will survive WP updates. Create a new directory under
Activate the plugin and go to your editor. When you go to the post editor and click the "Edit link" button, the correct value should be set for the "Target" dropdown.
You can create a filter for the hook
I would try something like (warning: untested):
I tried the Plugin Name: WPSE 7785 idea above - the Plugin installed successfully but didn't change the default setting for "Open link in a new window/tab" - which I believe is the intention of the original request.
I did a bit more searching/testing and found that the control for this is actually in the following WordPress file: /wp-admin/includes/internal-linking.php
Around line 85 is the following:
I simply added "checked" to the input:
The drawback is that this file is overwritten when WordPress is updated but for now I have a "readme.txt" file in my WP folder for future reference/reminder. I'm sure there is a way to create a hook outside of the admin folder that could be used to control this and not be affected by updates but I'm not at that level of WP skill yet.