External links are links that open pages on other websites, not your help center. Having external links set to open in a new tab often leads to a better user experience.
For example, let’s say your Flare topic contains a process. Part-way through the process, you add a link to more detailed information that is on your website. You don’t want users to leave their place in the process, so you set the link to open in a new tab or window. That way, they won’t lose their place in the process.
In Flare, you can set each individual external link to open in a new tab or window. But you have to set them individually. A quicker approach is to use a script that will apply to them all, without affecting the internal links. (Internal links are links from one page in your help centre to another page in your help centre).
Using a Script to Open All External Links in a New Tab
There are two ways of getting all external links to open in a new tab:
Go through the project and reset the target for every external link manually. You don't want to do this on a large project.
Use a script on your master page(s). This way is quick and easy, just how I like it.
The script you need to add is shown below (and thanks to Dave Lee for suggesting this on the MadCap Forums):
<script type="text/javascript">/*<![CDATA[*/$("a[href^='http://']").attr("target","_blank");/*]]>*/</script>
Copy and paste the script into your master page's xhmtl code. It can go anywhere inside the body tags. I usually add mine at the bottom.
That's it! All your external links will open in a new tab, while your internal ones will still open in the current tab (where you are viewing the Flare content).