Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I frequently want to paste a URL and page title into a document or email message. When I drag and drop a URL from Safari and other browsers (by dragging the URL icon) I see the page title being dragged with the cursor. However, when I drop it in Terminal or in a Gmail message in plain text, I get the URL only and when I drop it in Textedit or in a Gmail message with rich text, I see the title only (with the link). Can I get both?

share|improve this question
add comment

2 Answers 2

Byword seems to do that by default:

It's not really drag and drop, but you could also assign a shortcut to a script like this:

tell application "Safari" to tell document 1
    set the clipboard to "[" & name & "](" & URL & ")"
end tell
share|improve this answer
    
+1 for the AppleScript solution, which is actually better than drag and drop. Thanks. –  lhf Sep 12 '12 at 14:24
add comment

If you paste into an OS X app that accepts rich text input (i.e. not a web app like gmail), you'll get the title as text with the URL as the link to that text—try it in TextEdit. If you need the title and URL as plaintext, you could use an AppleScript like this one that will copy the URL and title of the active Safari tab to the clipboard (you may want to change the formatting to your liking).

share|improve this answer
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.