This page is available as Markdown at /api/editor/functions/useeditor.md.
For the full documentation index, see /llms.txt, or
the complete corpus at /llms-full.txt.
useEditor
useEditor():
Editor
Defined in: packages/editor/src/editor/use-editor.ts:19
Get the current editor context from the EditorProvider.
Must be used inside the EditorProvider component.
Returns
Section titled “Returns”The current editor object.
Example
Section titled “Example”import { useEditor } from '@portabletext/editor'
function MyComponent() { const editor = useEditor()}