Create Links That Open in a New Window or Tab?

Michael Morrison's Avatar

Michael Morrison

29 Apr, 2013 05:26 PM

Hello,

I would like the ability to have my rendered links created such that they open in a new window. Is there a way to do this via Marked? Or do I need to manually edit each link in the rendered html?

Thanks!

Michael

  1. Support Staff 1 Posted by Brett on 29 Apr, 2013 05:40 PM

    Brett's Avatar

    MultiMarkdown (the default processor) allows you to add attributes to reference links (will not work with inline links):

    [something][bla]

    [bla]: http://brettterpstra.com target="_blank"

    Be aware that this is not standard Markdown syntax (standard Markdown doesn't allow for this) so your links will only get the attributes when using MultiMarkdown or similar processor.

    -Brett

  2. 2 Posted by Michael Morriso... on 29 Apr, 2013 05:46 PM

    Michael Morrison's Avatar

    Hello Brett,

    This is fantastic! Thanks!

    With a number of syntax variations and definitions in existence, I find that I am beginning to think of Marked as the authority on syntax; that's where I do all my render, so it is the *de facto*, definitive syntax! :-)

    Thanks again,

    Michael

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac