I am creating links to PDF files. Currently, when a user clicks on the link, it navigates from the Confluence page to the PDF. I would prefer the PDF opened in a new tab by default. Is this possible?
Hello,
If those links are to pdf files stored somewhere else, you can follow How to force links to open in a new window KB:
At end of the HEAD
For external links only, like [<a href="http://www.google.com/" target="_blank" rel="nofollow noopener noreferrer">http://www.google.com</a>]:
[<a href="http://www.google.com/" target="_blank" rel="nofollow noopener noreferrer">http://www.google.com</a>]
<script> jQuery(document).ready(function() { jQuery(".external-link").attr("target", "_blank"); }); </script>
For all type of links (internal and external):
<script> jQuery(document).ready(function() { jQuery(".wiki-content a").attr("target", "_blank"); }); </script>
If you want Attachments to open in a new tab, and you are using Confluence Server, then How do I make my attachments open in a new window or tab? the guide should help. You would need to make some customisations for that. Let me know if you have any questions.
Regards,
Igor
It looks like you're new here. Sign in or register to get started.