Interface: EditorOptions
Options for createEditor().
Properties
| Property | Type | Description |
|---|---|---|
content? | DocJSON | null | Initial document. Omit for an empty document. |
editable? | boolean | Whether the user can edit. Defaults to true. |
element? | HTMLElement | Element to mount into. Omit to create the editor first and call mount() later. |
extensions | Extension[] | Extensions that make up the editor, usually a preset such as basic(). |
label | EditorLabel | Accessible name: an aria-label string or the id of a labelling element. |
onBlur? | (editor) => void | Called when the editable area loses focus, also when it is unmounted while focused. |
onChange? | (editor) => void | Called after every change to the document. |
onFocus? | (editor) => void | Called when the editable area gains focus. |
placeholder? | string | Text shown (and announced) while the document is empty. |