Link with target blank in rich text/markup?

Since the strapi markdown editor is not the best one out there you should probably keep it to using javascript. This will of course target all “a” tags inside a content block.

Something like

let links = document.querySelectorAll(".content a");
for (var i = 0; i < links.length; i++) {
  if (links[i].hostname != window.location.hostname) {
    links[i].target = "_blank";
  }
}