diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsx index a2399c72..99f8d252 100644 --- a/web/src/components/MemoEditor.tsx +++ b/web/src/components/MemoEditor.tsx @@ -239,6 +239,12 @@ const MemoEditor: React.FC = () => { }); }; + const handleKeyDown = (event: React.KeyboardEvent) => { + if (event.key === "Escape") { + state.fullscreen && handleFullscreenBtnClick(); + } + }; + const handleTagSeletorClick = useCallback((event: React.MouseEvent) => { if (tagSeletorRef.current !== event.target && tagSeletorRef.current?.contains(event.target as Node)) { editorRef.current?.insertText(`#${(event.target as HTMLElement).textContent} ` ?? ""); @@ -287,7 +293,10 @@ const MemoEditor: React.FC = () => { ); return ( -