diff --git a/shared/editor/marks/Link.tsx b/shared/editor/marks/Link.tsx index 11f4817cb..04ce4714b 100644 --- a/shared/editor/marks/Link.tsx +++ b/shared/editor/marks/Link.tsx @@ -68,6 +68,9 @@ export default class Link extends Mark { href: { default: "", }, + title: { + default: null, + }, }, inclusive: false, parseDOM: [ @@ -75,6 +78,7 @@ export default class Link extends Mark { tag: "a[href]", getAttrs: (dom: HTMLElement) => ({ href: dom.getAttribute("href"), + title: dom.getAttribute("title"), }), }, ], @@ -315,9 +319,9 @@ export default class Link extends Mark { parseMarkdown() { return { mark: "link", - getAttrs: (tok: Token) => ({ - href: tok.attrGet("href"), - title: tok.attrGet("title") || null, + getAttrs: (token: Token) => ({ + href: token.attrGet("href"), + title: token.attrGet("title") || null, }), }; }