diff --git a/packages/lexical-playground/src/plugins/ToolbarPlugin/index.tsx b/packages/lexical-playground/src/plugins/ToolbarPlugin/index.tsx index 40763f97e1d..6085c7f14e1 100644 --- a/packages/lexical-playground/src/plugins/ToolbarPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/ToolbarPlugin/index.tsx @@ -794,8 +794,10 @@ export default function ToolbarPlugin({ const insertLink = useCallback(() => { if (!isLink) { + setIsLinkEditMode(true); editor.dispatchCommand(TOGGLE_LINK_COMMAND, sanitizeUrl('https://')); } else { + setIsLinkEditMode(false); editor.dispatchCommand(TOGGLE_LINK_COMMAND, null); } }, [editor, isLink]);