Skip to content

Interface: UseEditorOptions ​

Options for useEditor(). element is handled by <EditorContent>; editable may be a ref.

Extends ​

Properties ​

PropertyTypeDescriptionInherited from
content?DocJSON | nullInitial 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.-
extensionsExtension[]Extensions that make up the editor, usually a preset such as basic().EditorOptions.extensions
labelEditorLabelAccessible name: an aria-label string or the id of a labelling element.EditorOptions.label
onBlur?(editor) => voidCalled when the editable area loses focus, also when it is unmounted while focused.EditorOptions.onBlur
onChange?(editor) => voidCalled after every change to the document.EditorOptions.onChange
onFocus?(editor) => voidCalled when the editable area gains focus.EditorOptions.onFocus
placeholder?stringText shown (and announced) while the document is empty.EditorOptions.placeholder