> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# useEditor

> Imperative API for interacting with the editor.

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

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

<EditorRoot>
  <CustomComponent/>
</EditorRoot>
```

## Props

**editor** `Editor`

All methods are available here [Editor](https://tiptap.dev/docs/editor/api/editor)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.