diff --git a/libs/components/editor-core/src/RenderRoot.tsx b/libs/components/editor-core/src/RenderRoot.tsx index d6af706ebe..13c2bbbc82 100644 --- a/libs/components/editor-core/src/RenderRoot.tsx +++ b/libs/components/editor-core/src/RenderRoot.tsx @@ -11,6 +11,7 @@ import { type ReturnUnobserve, } from '@toeverything/datasource/db-service'; import { addNewGroup } from './recast-block'; +import { HookType } from './editor'; interface RenderRootProps { editor: BlockEditor; @@ -178,6 +179,10 @@ export const RenderRoot: FC> = ({ editor.getHooks().onRootNodeDrop(event); }; + const onScroll = (event: React.UIEvent) => { + editor.getHooks().onRootNodeScroll(event); + }; + return ( > = ({ onDragOverCapture={onDragOverCapture} onDragEnd={onDragEnd} onDrop={onDrop} + onScroll={onScroll} > void; beforeCopy: (e: ClipboardEvent) => void; beforeCut: (e: ClipboardEvent) => void; + onRootNodeScroll: (e: React.UIEvent) => void; } export type AnyFunction = (...args: any[]) => any;