1

I have an XPages app. How can you open a link in a new tab, if the link is in a rich text field?

Source code:

<xp:inputRichText value="#{document1.Demo}" id="inputRichText3">
<xp:this.dojoAttributes>
<xp:dojoAttribute name="toolBarType" value="Slim">
</xp:dojoAttribute>
</xp:this.dojoAttributes>
</xp:inputRichText>
Per Henrik Lausten
  • 21,331
  • 3
  • 29
  • 76

1 Answers1

4

Something like this could do it

dojo.addOnLoad(function(){
dojo.forEach(dojo.query(".xspInputFieldRichText a"),function(aTag)
{dojo.attr(aTag,"target","_blank");
});
});
umeli
  • 1,068
  • 8
  • 14