Open external links in a new tab (#1229)

Fixes https://github.com/silverbulletmd/silverbullet/issues/1228. This matches the generated HTML to the current behavior of editor.openUrl.
pull/1230/head
Ohad Lutzky 2025-02-03 18:52:45 +00:00 committed by GitHub
parent c27c83bc44
commit 1e30517955
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -233,6 +233,7 @@ function render(
name: "a",
attrs: {
href: url,
target: "_blank",
},
body: cleanTags(mapRender(linkTextChildren)),
};
@ -255,6 +256,7 @@ function render(
name: "a",
attrs: {
href: url,
target: "_blank",
},
body: url,
};
@ -333,6 +335,7 @@ function render(
name: "a",
attrs: {
href: url,
target: "_blank",
},
body: url,
};