Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When writing a post or page in the post editor (not the Visual editor but the HTML editor) and clicking on the "link" button, a popup appears with http:// already prefilled.

Is there a way to change this default text?

For example, since I usually link internally to my own site I would want to use my base URL because then I could either quickly type the rest of the URL, or just overwrite it if I was hyperlinking somewhere else.

http://www.myurl.com/

I swear I saw a blog article on how to do this but I cannot locate it through searching the web.

Thanks in advance for any help.

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

You could try hacking into wp-includes/js/tinymce/plugins/wplink/js/wplink.js

and change:

  • if(!i.href||i.href=="http://") (two times)
  • b.url.val("http://
share|improve this answer
    
Is there any way to do it by editing quicktags.js? I went through the file but it wasn't obvious. –  JimmyPena Nov 30 '11 at 16:31
    
i don't think quicktags.js has anything to do with this. Editing wplink.js shouldn't be so hard, though: just do find&replace 'http://' to 'myurl.com'; 3 times and you're done... –  ptriek Nov 30 '11 at 16:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.