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

This widget could not be displayed.


there is a free Confluence add-on that could help you do this


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 Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

445 views 5 6
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