Paste Safari Link In MarsEdit

January 3rd, 2013

One of the MarsEdit features that people really like is the simplicity of pasting a URL link into a post. Just copy a URL from anywhere, then press Cmd-Shift-A to transform the selected text in MarsEdit into a link.

Today a MarsEdit customer wrote with a more specific request: he would like to easily insert links to whatever page he happens to have open in Safari, while also using the title of the page as the link text. This is the kind of specialized feature that is less likely to show up as a built-in feature of MarsEdit, because if I added all the specialized features that might be handy here and there, it would quickly become overwhelming. But it’s the kind of thing where I’m very grateful for MarsEdit’s scriptability. Within a few minutes, I was able to share with this customer a script that does just what he wanted.

Click to download: Paste Safari Link script.

If you want to attach a keyboard shortcut to the script, you could use FastScripts, or you can add the script to MarsEdit’s Scripts folder, and then assign a keyboard shortcut using System Preferences:

  1. From MarsEdit’s script menu, select “Open Scripts Folder”.
  2. Drag the “Paste Safari Link” script into the folder.
  3. Open System Preferences
  4. Navigate to Keyboard, Keyboard Shortcuts, and select Application Shortcuts.
  5. Add a new shortcut for MarsEdit, specifying “Paste Safari Link” as the menu title.

When invoked, the script will insert a link to the active Safari page’s URL, using the page’s title as the text of the link. If you want to use different text as the title of the link, the just type and select it in MarsEdit before invoking the script.

5 Responses to “Paste Safari Link In MarsEdit”

  1. William Bowles Says:

    Where are these goodies listed please as they’re not in the ‘help’ section?

    Bill

  2. Daniel Jalkut Says:

    Hi Bill – can you be specific about the goodies you’re looking for being mentioned? Do you mean how to script MarsEdit? I’m afraid it isn’t very well documented which is one reason I like to occasionally mention solutions e.g. here such as the one above.

  3. William Bowles Says:

    Hi Daniel,
    Nothing specific but as with the shortcut you mentioned above, I wouldn’t have known about it but for this post. Perhaps a list of all the hidden stuff?

    ¡Feliz Navidad!

    Bill

  4. Daniel Jalkut Says:

    Thanks for clarifying, Bill. The shortcut in particular in this case is documented in the sense that the shortcut appears in the menu item where this command lives, the “Format” menu. If you select Format from the main MarsEdit menu bar, you’ll see there are shortcuts listed next to many of the build in formatting actions.

  5. William Bowles Says:

    BTW, I’ve loaded an extension called Clicktofllash, that seems to have eliminated the Flash crashes I was getting in ME.

    B

Comments are Closed.

Follow the Conversation

Stay up-to-date by subscribing to the Comments RSS Feed for this entry.