Your component must be a child of EditorRoot to use this hook.

const CustomComponent = ({ open, onOpenChange }: LinkSelectorProps) => {
  const { editor } = useEditor();
...
}

<EditorRoot>
  <CustomComponent/>
</EditorRoot>

Props

editor
Editor

All methods are available here Editor