Interface: UseEditorOptions
Options for useEditor(). element is handled by <EditorContent>; editable may be a ref.
Extends
Omit<EditorOptions,"element"|"editable">
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
content? | DocJSON | null | Initial document. Omit for an empty document. | EditorOptions.content |
editable? | MaybeRefOrGetter<boolean> | Whether the user can edit. A ref or getter is watched and applied on change. Default true. | - |
extensions | Extension[] | Extensions that make up the editor, usually a preset such as basic(). | EditorOptions.extensions |
label | EditorLabel | Accessible name: an aria-label string or the id of a labelling element. | EditorOptions.label |
onBlur? | (editor) => void | Called when the editable area loses focus, also when it is unmounted while focused. | EditorOptions.onBlur |
onChange? | (editor) => void | Called after every change to the document. | EditorOptions.onChange |
onFocus? | (editor) => void | Called when the editable area gains focus. | EditorOptions.onFocus |
placeholder? | string | Text shown (and announced) while the document is empty. | EditorOptions.placeholder |