mirror of https://github.com/fantasticit/think.git
fix: fix unset link
parent
f2ce4b01b3
commit
daa0849e1e
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue