Open all external links in a new window/tab

We want our external links to open in a new window or tab.

This article explains how to do this, but it's only working for links in a page. It's not working for external links in our space shortcuts.

I've found that external links in a page have the class 'external-link' like the article suggests, but the links in the space shortcuts have the class 'external_link' with an underscore instead of a dash. Even if I replace the dash with an underscore the link in the space shortcuts is opened in the same window anyway.

Is there a way to make external links in the space shortcuts open in target _blank as well?

1 answer

The article points to that plugin as well but we would like to solve it without adding just another plugin. Is it not possible to do this with a simple piece of javascript?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,120 views 17 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you