From daa0849e1ec6bccf6420a1a14e822a0676c2ee8d Mon Sep 17 00:00:00 2001 From: fantasticit Date: Sun, 3 Apr 2022 11:36:29 +0800 Subject: [PATCH] fix: fix unset link --- packages/client/src/tiptap/menus/link.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/tiptap/menus/link.tsx b/packages/client/src/tiptap/menus/link.tsx index f00d8b6..7a9afb0 100644 --- a/packages/client/src/tiptap/menus/link.tsx +++ b/packages/client/src/tiptap/menus/link.tsx @@ -62,7 +62,7 @@ export const LinkBubbleMenu = ({ editor }) => { toggleVisible(true); }, []); - const unsetLink = useCallback(() => editor.chain().unsetLink().run(), [editor]); + const unsetLink = useCallback(() => editor.chain().extendMarkRange(Link.name).unsetLink().run(), [editor]); useEffect(() => { if (!isLinkActive) return;