feat: add editor.getAttributes, deprecate editor.getNodeAttributes and editor.getMarkAttributes

This commit is contained in:
Philipp Kühn
2021-05-07 11:10:18 +02:00
parent 58f49b563c
commit 072905cb95
5 changed files with 47 additions and 5 deletions

View File

@@ -116,7 +116,7 @@ export const Link = Mark.create<LinkOptions>({
key: new PluginKey('handleClickLink'),
props: {
handleClick: (view, pos, event) => {
const attrs = this.editor.getMarkAttributes('link')
const attrs = this.editor.getAttributes('link')
const link = (event.target as HTMLElement)?.closest('a')
if (link && attrs.href) {