fix: Pasted links should not by default have underline mark, closes #6292

This commit is contained in:
Tom Moor
2023-12-14 21:49:47 -05:00
parent feaadc8276
commit c40ab288fa

View File

@@ -14,8 +14,13 @@ export default class Underline extends Mark {
parseDOM: [
{ tag: "u" },
{
style: "text-decoration",
getAttrs: (value) => (value === "underline" ? null : false),
consuming: false,
tag: ":not(a)",
getAttrs: (node: HTMLElement) =>
node.style.textDecoration.includes("underline") ||
node.style.textDecorationLine.includes("underline")
? null
: false,
},
],
toDOM: () => ["u", 0],