fix: fix unset link

This commit is contained in:
fantasticit 2022-04-03 11:36:29 +08:00
parent f2ce4b01b3
commit daa0849e1e
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ export const LinkBubbleMenu = ({ editor }) => {
toggleVisible(true); toggleVisible(true);
}, []); }, []);
const unsetLink = useCallback(() => editor.chain().unsetLink().run(), [editor]); const unsetLink = useCallback(() => editor.chain().extendMarkRange(Link.name).unsetLink().run(), [editor]);
useEffect(() => { useEffect(() => {
if (!isLinkActive) return; if (!isLinkActive) return;