Need assistance on how to use the announcement banner to open URL hyperlinks in wiki style fields in a new tab.
you can use like this
<a href="https://www.google.com/" target="_blank">Open link in new tab</a>
Thanks Muhammad,
What would be the code to add this logic in the Announcement Banner for all URL's in fields.
There is no logic required, Just add basic html tags for your requirements how you want to show the banner.
for example your banners is like this
Text line 1<br>Text line 2<br>
Link1: <a href="https://www.google.com/" target="_blank">Open link in new tab</a><br>Link2: <a href="https://www.google.com/" target="_blank">Open link in new tab</a>
<br>
Text line4
The following did the job:
writer.write('''<script>window.setTimeout(function(){AJS.$('a:not([target=_blank])[href^=http].attr('target', '_blank');}, 500);</script>''')
It looks like you're new here. Sign in or register to get started.