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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The following did the job:
writer.write('''
<script>
window.setTimeout(function(){
AJS.$('a:not([target=_blank])[href^=http].attr('target', '_blank');
}, 500);
</script>
''')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.