diff --git a/client/src/features/editor/Editor.tsx b/client/src/features/editor/Editor.tsx index f8424eb7..7b7302fa 100644 --- a/client/src/features/editor/Editor.tsx +++ b/client/src/features/editor/Editor.tsx @@ -13,6 +13,7 @@ import { useSocketStore } from "@src/stores/useSocketStore.ts"; import { editorContainer, editorTitleContainer, editorTitle } from "./Editor.style"; import { Block } from "./components/block/Block.tsx"; import { useBlockDragAndDrop } from "./hooks/useBlockDragAndDrop"; +import { useBlockOptionSelect } from "./hooks/useBlockOption.ts"; import { useMarkdownGrammer } from "./hooks/useMarkdownGrammer"; interface EditorProps { @@ -55,6 +56,17 @@ export const Editor = ({ onTitleChange, pageId, serializedEditorData }: EditorPr pageId, }); + const { handleTypeSelect, handleAnimationSelect, handleCopySelect, handleDeleteSelect } = + useBlockOptionSelect({ + editorCRDT: editorCRDT.current, + editorState, + setEditorState, + pageId, + sendBlockUpdateOperation, + sendBlockDeleteOperation, + sendBlockInsertOperation, + }); + const { handleKeyDown } = useMarkdownGrammer({ editorCRDT: editorCRDT.current, editorState, @@ -275,6 +287,8 @@ export const Editor = ({ onTitleChange, pageId, serializedEditorData }: EditorPr onInput={handleBlockInput} onKeyDown={handleKeyDown} onClick={handleBlockClick} + onAnimationSelect={handleAnimationSelect} + onTypeSelect={handleTypeSelect} /> ))}