Open links in a new tab

Hi @zorbazelda! At the moment it is not supported in the current Write.as Markdown. I’d recommend using HTML instead:

<a href="http://example.com/" target="_blank">Hello, world!</a>

If you wanted to get more technical, you could add Custom JS to your site (if you have a Write.as Pro subscription) that would make each link on your blog open in a new tab. That way you could use Markdown normally and not have to use the above HTML. That JS would look something like this:

var links = document.links;

for (var i = 0, linksLength = links.length; i < linksLength; i++) {
   if (links[i].hostname != window.location.hostname) {
       links[i].target = '_blank';
   } 
}

But the you mention would be a perfect suggestion to put in this topic where we are exploring different Markdown standards/options to implement in Write.as. Thanks for bringing this up and hope this answers your question!

4 Likes