Skip to content

Interface: EditorOptions ​

Options for createEditor().

Properties ​

PropertyTypeDescription
content?DocJSON | nullInitial document. Omit for an empty document.
editable?booleanWhether the user can edit. Defaults to true.
element?HTMLElementElement to mount into. Omit to create the editor first and call mount() later.
extensionsExtension[]Extensions that make up the editor, usually a preset such as basic().
labelEditorLabelAccessible name: an aria-label string or the id of a labelling element.
onBlur?(editor) => voidCalled when the editable area loses focus, also when it is unmounted while focused.
onChange?(editor) => voidCalled after every change to the document.
onFocus?(editor) => voidCalled when the editable area gains focus.
placeholder?stringText shown (and announced) while the document is empty.