How to apply << target="_blank" rel="noopener noreferrer" >> to every LINK(URL) in the knowledge articles?

MaO2
Tera Contributor

In our team, when we make knowledge articles, we import word documents to a knowledge base and apply CSS to arrange the appearance.

We also want to apply << target="_blank" rel="noopener noreferrer" >> to every LINK(URL) in the knowledge articles.
*Not only target="_blank" but also rel="noopener noreferrer" is needed.

Anyone know how to do it using CSS, Scripts or other ways?
I mean, we want to make it without the word authors setting << target="_blank" rel="noopener noreferrer" >> to each links.

Thanks.

1 ACCEPTED SOLUTION

okay so you click a article from Most viewed widget correct. If that's the case go to widget search for KB Most viewed widget and in HTML part look for this line

<a href="?id=kb_article&sys_id={{::a.sys_id}}">{{::a.short_description}}</a> // you need to add target="_blank" to open in new tab

clone the widget replace the below line and add the cloned widget to your portal page

<a href="?id=kb_article&sys_id={{::a.sys_id}}" target='_blank'>{{::a.short_description}}</a>

 

 

 

Regards
Harish

View solution in original post

6 REPLIES 6

okay so you click a article from Most viewed widget correct. If that's the case go to widget search for KB Most viewed widget and in HTML part look for this line

<a href="?id=kb_article&sys_id={{::a.sys_id}}">{{::a.short_description}}</a> // you need to add target="_blank" to open in new tab

clone the widget replace the below line and add the cloned widget to your portal page

<a href="?id=kb_article&sys_id={{::a.sys_id}}" target='_blank'>{{::a.short_description}}</a>

 

 

 

Regards
Harish

MaO2
Tera Contributor

Sorry for such a late reply.

Yes, "clone the widget" was necessary and I could solve the problem.

Thank you!!!!!