UNPKG

@blocknote/react

Version:

A "Notion-style" block-based extensible text editor built on top of Prosemirror and Tiptap.

11 lines (8 loc) 302 B
import { useEffect } from "react"; import { useBlockNoteEditor } from "./useBlockNoteEditor.js"; export function useOnUploadStart(callback: (blockId?: string) => void) { const editor = useBlockNoteEditor(); useEffect(() => { return editor.onUploadStart(callback); }, [callback, editor]); }