Further work on keeping links when switching tabs

Split insertLink function up so that it calls getLinkTag - this allows
me to call insertLink to insert a link without re-adding the link to the
hyperlink manager