From 1181f77d9526256f9ddb481c516a161fd1bf85a3 Mon Sep 17 00:00:00 2001 From: Jiaxun Li Date: Fri, 3 Dec 2021 12:02:37 +0800 Subject: [PATCH] fix: link plugin type define --- src/extensions/link.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/extensions/link.ts b/src/extensions/link.ts index 92b52597..0f93f22d 100644 --- a/src/extensions/link.ts +++ b/src/extensions/link.ts @@ -1,6 +1,7 @@ import { Mark as ProsemirrorMark } from 'prosemirror-model'; import { Plugin, TextSelection } from 'prosemirror-state'; import { Link as TiptapLink } from 'tiptap-extensions'; +import { EditorView } from 'prosemirror-view'; // @ts-ignore import { getMarkRange } from 'tiptap-utils'; import { MenuData } from 'tiptap'; @@ -62,7 +63,7 @@ export default class Link extends TiptapLink implements MenuBtnView { return [ new Plugin({ props: { - handleClick (view, pos) { + handleClick (view: EditorView, pos: number) { const { schema, doc, tr } = view.state; const range = getMarkRange(doc.resolve(pos), schema.marks.link);