Closed whoabuddy closed 4 years ago
Due to markdown limitation on link targets, add javascript to append target="_blank" to any external links.
target="_blank"
Example code from StackOverflow:
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'; } }
Simpler approach might be to use Markdown Render Hooks which would happen before page load.
Due to markdown limitation on link targets, add javascript to append
target="_blank"
to any external links.Example code from StackOverflow: