Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I make external links from Confluence open in a new tab?

Danny Lorenty July 30, 2014

I can't seem to get any help from any of the articles on here. Could anyone help, please?

1 answer

1 accepted

1 vote
Answer accepted
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 30, 2014

In the custom html seciotn of Confluence Admin add this to the after body section.

<script type="text/javascript">
AJS.toInit(function () {
  AJS.$("a[href^='http']").not("[href*='" + location.host + "']").attr('target','_blank');
});
</script>

Danny Lorenty July 30, 2014

Worked like a charm! Thank you so much, Davin. Much appreciated.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events