: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:
5
packages/editor-ui/src/components/helpers.ts
Normal file
5
packages/editor-ui/src/components/helpers.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export function addTargetBlank(html: string) {
|
||||
return html.includes('href=')
|
||||
? html.replace(/href=/g, 'target="_blank" href=')
|
||||
: html;
|
||||
}
|
||||
Reference in New Issue
Block a user