Hi all,
i have been finding ways to do hyperlink in confluence which open a new tab or new window browser, but i fail to find one.
Is it possible to be done? because i cannot find it in this link
https://confluence.atlassian.com/display/DOC/Confluence+Wiki+Markup#ConfluenceWikiMarkup-Links
Can anybody help me?
It's a fairly common need depending on what you need to reference when building documents in confluence. The last thing you want to do is pull people from confluence on every link when you're sending someone to a reference for quick review.
I would like to see an improvement added where you can simply define whether the link is to open in the current window (use the current method) or open in a separate window/tab (add some form of anchor like ^ to the end of the current method).
I agree with Steve, make it a simple flag on the link macro params.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm so sure I've seen this feature in an Atlassian product, I thought it was confluence, but I must be mistaken, but a simple tickbox with "open in new window" would be perfect.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As stated In several answers below, the solution that works for non-admin users is to insert an HTML macro.
The normal "Insert Link" will not do this, and Atlassian closed the feature request as "won't fix".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Question is the hyperlink to another Confluence page? Is it cloud or server?
If it is Link in new tab is the macro you are looking for.
In the parameters in the "Link in new tab" has an option where you can target the new window as a location so your other link in a new tab
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this option doens't exist anymore?
is there another way to create links that opens in a new tab?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's asinine, really.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
and all the 'solved' links lead to the same answer - no good if not an admin and not for OnDemand.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are right Julian. When it comes to a Cloud product, they have to be extra diligent on the security of that product. If someone were to write something that caused a vulnerability, it wouldn't just affect the one customer, but probably all of their customers.
We use the Server product on our end and that allows me to customize as needed without the restrictions Atlassian has set on the Cloud versions. This does come with it's own burdens though too (product updates, general maintenance, add-on updates... depending on how you use it, it can be a fair list).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Steven.
Still doesn't explain why in 6 years they couldn't have provided this simple feature for all users.
Ah well, we two-finger, or right-click, onwards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe my answer below doesn't involve admin access, only editorial:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Seriously!!! YES!!!!! Please add this ability.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
...hare to believe that it's 2019 and NO action on this issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Keep increasing my licensing costs but cannot open a link in a new window. Right...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's a shame that such a pricey product hasn't such a simple feature.
Buying Iframes for Confluence adds even more costs.
Btw: why is it possible in this forum to insert my link above with "open in new page" ?
Surely another macro for money...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is a single middle mouse (wheel) click. Ok, on laptops its ctrl/cmd + tap. How much shorter can it be...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Single click is shorter. The issue is when a link is in a field description. If a user hits that link while creating a ticket, all info in the ticket is lost.
If multiple people want a feature, there's usually a reason why.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, just wanted to let everyone know there is a Suggestion open for this functionality: Provide the ability to create a link in Confluence that will open in a new tab.
Please check out the comments on the ticket and feel free to weigh in with your use cases to communicate directly with the development team.
Voting or commenting also adds you to notifications, so you can follow the status.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which is a duplicate of https://jira.atlassian.com/browse/CONFSERVER-11194 which is marked as resolved "won't fix".
Useless.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
100% useless
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
7 years after the original request, so many people asked for the same. Many years since Atlasian removed the ability to have links open in new pages (which was a thing back in the day) and still its not possible.
Is this just Atlasian hating their customers so much or is this them showing everyone that they know better...
Come on Atlasian show your paying customers some love and stop removing common functionality from your tools and making your users lives worse rather than better. Just add that tickbox back in and allow people to build pages that provide the user experience that they want/need to offer to their readers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Agreed.... this is such a fundamental User Experience need.... make it possible!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The confluence documentation explains this, though not perfectly clearly:
-Edit the page with the link which you wish to open to an external page.
-Click the '+' then 'other macros' search for 'html' and select the black icon [Bob Swift]
then paste the following:
<script> jQuery(document).ready(function() { jQuery(".external-link").attr("target", "_blank"); }); </script>
Then click on the 'Open in Source Editor' button < > at the top right of the editing page.
For every link, add the attribute class="external-link" within the <a> tag
<a class="external-link" href="https://www.google.com">Google</a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Artemis Support, this is very kind of you to research and offer this. But it is absolutely not an acceptable solution Atlassian wise. I don't any anyone doing this ten times a day, or even twice while they should be focused on content.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Works for me from API with html storage macro too
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there any way to accomplish this if you aren't an Admin?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can do an HTML macro and add something like...
<a href="https://www.yoursite.com" target="_blank">Your Site</a>
If you have to make it inline (like within a paragraph), then you can add something a little more complex like...
<p>This is a site for you to check out: <a href="https://www.yoursite.com" target="_blank">Your Site</a>. (This will open in a new tab)</p>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Panguin,
Please review the following FAQ pages, hopefully it would help you start on this:
https://confluence.atlassian.com/display/CONFKB/How+to+Force+Links+to+Open+in+a+New+Window
Hope it helps.
Cheers,
Septa Cahyadiputra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Septa,
Thanks for your help.
The code works like magic :)
Atlassian Rox!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Pleasure to help :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This did not work for me. I tried adding both target="_blank" and _target="_blank"_ to the anchor tag. The first did not result in a new window. The second resulted in the following error when I tried to apply the source code change:
Element type "a" must be followed by either attribute specifications, ">" or "/>". (400)
I also found this Atlassian article, which uses the HTML macro. However, my company does not apply the HTML macro for security reasons.
Finally, I cannot add a user macro as suggested in another reply, because (1) my company prohibits user macros and (2) I am not an admin.
II do not understand why I cannot use the standard html code <a href="http://google.com" target="_blank"> or the Atlassian suggested variantion, <a href="http://google.com" _target="_blank"_>.
My company is running Confluence Server 5.9.
The only HTML macros I have available are HTML Table, HTML Comment and HTML Image.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Steven and David,
Thank you for your quick replies. Even though the macro add-on would solve the problem, I think it is too much to pay an extra 6$ a month just to be able to open a link in a new tab. I wish Atlassian would just add a checkbox "open in new tab" like any other programme...!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Comon Nathalie, If you don't pay for the basic functionality that should already exist in this POS product then the big guy couldn't afford this:
https://money.cnn.com/2018/09/27/luxury/mike-cannon-brookes-house/index.html
Oh, don't be afraid to click on the link 'cause it opens up in a new tab. Guess they could get this forum to work that way... ;+}
-Jim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Haha, true ;-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But, for "OnDemand" versión: How can I add this hack?
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am having the same problem! How to add a hack to allow me to open up link in a new window using "on demand" version of Confluence?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there any way to accomplish this if you aren't an Admin?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you could create a user macro that you'd use instead of a regular link
https://confluence.atlassian.com/display/DOC/Writing+User+Macros
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is not available for OnDemand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your answer @Andrei but I think that community champions should approach the community needs differently. Instead of posting a work around, take the matter to your product group and advocate on behalf of the community.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Every so often I come back read this thread to hear what new arguments are posed for the feature or not.
I'm beginning to think that I don't want Atlassian to do the right thing and implement it, because then this thread would wither and die and I'd lose the entertainment.
What a sad state of affairs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's another solution not targeting every link on a page :)
Use the HTML macro element to manually create you links in HTML.
Edit mode
View mode
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have tried using David's solution to open a link in a new tab, however I cannot find the option to add a HTML macro to my Atlassian article. The only thing I found is "HTML comment", however this does not appear on the published page. Could anyone help me?
Thanks a lot in advance!
Nathalie.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nathalie,
This article should help you out:
https://confluence.atlassian.com/doc/html-macro-38273085.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As far as I know, administrators manage which macros are available.
It is not without security risks to use the HTML macro, as it opens up for e.g. cross-site scripting, thus your administrator might have disabled it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That would be a god awful feature. Choice between same tab, new tab or new windows must belong to the page viewer, not the page creator. Wait, must is not a strong enough word.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@StepanStulovGoodlyInnovations ... there are many perspectives and uses around websites, and depending on how the site is used, your statement could be accurate. But it hardly dictates a standard for all cases.
Relating to your question above...
It is a single middle mouse (wheel) click. Ok, on laptops its ctrl/cmd + tap. How much shorter can it be and why on earth does the page creator decides this for the page viewer?
Not everyone is technical-minded enough on each shortcut provided from the device you're using. Example... you defined ways to open the content outside of the page if you're using a mouse or laptop. There are quite a few more. So for those that like your suggestion, but don't know each way to do it, it would help if you provided a reference for them to go and look those up. But then you face those who are not interested in learning each shortcut each OS provides via the attached hardware.
The issue presented was that the OP wants to open a page without taking over the page that the end-user is on when they click the link, a very normal property defined for hyperlinks and also defined in HTML standards.
An example I'd use in my case:
Another case would be a big outlet. You're on their site browsing things to buy. As a courtesy, they provide the products website in the details. If you click that link, it will often open a new tab or window. This is a marketing strategy used to retain the end-user, which assists with your profitability in the long run because the users aren't dropping off randomly due to distractions and getting lost in other sites and products.
You could say that, "Well... they have a Back button and a hotkey for that Back button", but an end-user doesn't always want to ditch the new page, so now you've forced them to make a choice between going back or continuing on, with the over-complicated option of copying the link before going back if they want both the original page and new.
It is the website/application's creator who best decides what the default options are for their hyperlinks, not the end-users... and there are specific reasons behind those choices, which does often include what works best for the end-user, but more-so takes into account the purpose and content of the site itself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As a confluence page author, I'd like to keep the reader on my page or in confluence, since it is the center of the context. For external links, I like them to open in new tabs to retain the reader's context (rather than using the back button to reconnect readers to the context).
As an HTML developer, I use the target attribute this way too, when applicable.
I have seen developers overuse it and, yes, that can become an awful reader experience.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you guys, these are very thoughtful and considerate explanations.
You're explaining how you implement your strategy for the user. I don't argue the how. Your how is very thoughtful, well reasoned and well versed. The examples are also brilliant. I admire that way of thinking.
What I say is, you don't even get to decide. The decision dos not belong to you, despite there being a technical possibility for that, and despite you wanting to hand-hold the presumably not so sophisticated user. So, how is irrelevant, there is no how.
But it hardly dictates a standard for all cases.
Oh so unfortunately it doesn't, and that's why we have a circus with scary clowns as websites, each about to jump at you from a dark corner with their own "better" idea how to control your browser. I truly and wholeheartedly believe HTML target attribute should not exist.
You could say that, "Well... they have a Back button and a hotkey for that Back button", but an end-user doesn't always want to ditch the new page, so now you've forced them to make a choice between going back or continuing on, with the over-complicated option of copying the link before going back if they want both the original page and new.
If they want it, they do it, not you.
It is the website/application's creator who best decides what the default options are for their hyperlinks, not the end-users... and there are specific reasons behind those choices, which does often include what works best for the end-user, but more-so takes into account the purpose and content of the site itself.
No, not the creator, the end-user.
I propose we leave it at that, none of the sides makes an impression of being ready to change their mind :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, @StepanStulovGoodlyInnovations , for coming and sharing your thoughts. Unfortunately, this thread is about another user asking how to incorporate this function, not soliciting advice on whether he/she should or should not utilize this function. Your justification of why someone should not do this, plus your explanation of the difference between how and why, are essentially unhelpful and a waste of everyone's time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> not the creator, the end-user
"Cars shouldn't have automatic transmissions because the END USER should get to decide how he drives and when to shift! Not the creator!"
"Guns shouldn't have a safety because the end user should get to decide!"
"Houses shouldn't have walls because the end user should get to decide where he wants to go, not the architect!"
¯\_(ツ)_/¯
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Witty.
"Cars should have seats pre-adjusted to the massive car designer and not move, because it was comfortable for him".
"Radios should have fixed volume cranked up, because their creator likes death metal loud."
¯\_(ツ)_/¯
You get the point. Anyway, I fail to see what cars, guns and walls have to do with hyperlinks. Surely the world has a million things where it's best to leave it to the service giver (surgery) and another million to the service receiver (car seat adjustments). So what? I was only talking about hyperlinks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I propose we leave it at that, none of the sides makes an impression of being ready to change their mind :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can go for alternate options like:
Here is the discussion: https://jira.atlassian.com/browse/CONFSERVER-11194
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Last week, I installed Link Opener for Confluence by EliteSoft, it's free.
The only drawback against an atlassian macro solution is: it works on a global base, not as a macro per link, meaning:
It adds two settings in the users profile
"open internal link in new tab(window)" and
"open external link in new tab(window)", the second activated by default.
So every user selects his preference.
Nevertheless: the best choice in my opinion would be a selection in the confluence link creation to open it in a new tab or new windows, that should be easily implementable...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This sounds like more less acceptable solution, too bad it's for server based Confluence only :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Imagine paying $50 a month to allow users to open a link in a new tab by default...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It does seem stupid that this apparently simple request gets huge discussion and multiple rejections from Atlassian. If they implemented this they would get huge good will for minimal effort.
Ah well, nice to see them listen to users (not).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's kinda stupid we can't create a simple link pointing to a new page, and having to deal with macros for something so basic as this.
They talk about security in Cloud, but ... really ? Opening a link in a new page is a security risk ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So this is an old article - but wanted to drop that you can get this behavior by using the "Button Hyperlink" macro which has an option to allow the hyperlink to be opened in another tab ( and a few other options)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found "Button Hyperlink" a part of Adaptavists "Content Formatting Macros for Confluence" (400$ for 250 User) :-(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ah sorry - I did not realise that it was a paid macro!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This fits in with their new transparent process for customer suggestions? I think not.
Maybe their 'many hours of discussion' could have been spent knocking this little item out?
Ah well, onward. Let's see what else can take 7 yeas to get denied.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Naw, knocking out this feature would have taken only half that long!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
They've decided not to do it: https://jira.atlassian.com/browse/CONFSERVER-11194
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wow. [Head shaking.] Just wow. "Inconsistent experience for users." So they want it to be bad for everyone rather than some people have it good?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Attlasian recommends two plugins as a replacement.
One is free, so there's some risk that it will not be supported in a future Confluence version. If this happens, we have to change every occurence of the macro back to a standard link.
The other one is payware that does much more than just open a link in a new tab/window - so we have to pay for just a very basic function.
Very disappointing...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sometimes, I also faces the same problem with my working environment . But you have to bear it with your work. I have seen many blogs provide the tips to handle these issues . You can read their to get the solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.