Skip to content

ReactEditorRef

ReactEditorRef = (element) => (() => void) | undefined

Ref callback that mounts the editor into an element. Destructure it first, const { ref } = controller then <div ref={ref} />: the React Compiler reads ref={controller.ref} as a ref access and rejects later render reads of the controller. Relies on React 19 ref cleanups; React calls the returned function on detach.

HTMLElement | null

(() => void) | undefined