:xap: Open tooltip links on new tab (#2106)

*  Create mixin

*  Implement mixin

* 🔥 Remove hardcoded attribute

* 🔨 Refactor mixin into helper

* 🔨 Refactor string replacement

* ✏️ Unrelated description fixes

*  Simplify helper import
This commit is contained in:
Iván Ovejero
2021-08-26 19:42:38 +02:00
committed by GitHub
parent 0f072f9b98
commit 176e475c8e
66 changed files with 119 additions and 104 deletions

View File

@@ -0,0 +1,5 @@
export function addTargetBlank(html: string) {
return html.includes('href=')
? html.replace(/href=/g, 'target="_blank" href=')
: html;
}