Skip to content

Commit

Permalink
fix: link plugin type define
Browse files Browse the repository at this point in the history
  • Loading branch information
Leecason committed Dec 3, 2021
1 parent 416933a commit 1181f77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/extensions/link.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1181f77

Please sign in to comment.