[frontend/mfm] Make URLs and links open in a new tab
This commit is contained in:
parent
a77b6f2a92
commit
a9d42b214a
1 changed files with 2 additions and 0 deletions
|
@ -144,6 +144,7 @@ public static class MfmRenderer
|
|||
{
|
||||
var el = document.CreateElement("a");
|
||||
el.SetAttribute("href", node.Url);
|
||||
el.SetAttribute("target", "_blank");
|
||||
el.ClassName = "link-node";
|
||||
return el;
|
||||
}
|
||||
|
@ -182,6 +183,7 @@ public static class MfmRenderer
|
|||
{
|
||||
var el = document.CreateElement("a");
|
||||
el.SetAttribute("href", node.Url);
|
||||
el.SetAttribute("target", "_blank");
|
||||
el.ClassName = "url-node";
|
||||
el.TextContent = node.Url;
|
||||
return el;
|
||||
|
|
Loading…
Add table
Reference in a new issue