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()}