Skip to main content

Interface: InitialEditorConfig

Extended by

Properties

$initialEditorState?

optional $initialEditorState: InitialEditorStateType

The initial EditorState as a JSON string, an EditorState, or a function to update the editor (once).

Defined in

types.ts:365


editable?

optional editable: boolean

Whether the initial state of the editor is editable or not

Defined in

types.ts:351


html?

optional html: HTMLConfig

Overrides for HTML serialization (exportDOM) and deserialization (importDOM) that does not require subclassing and node replacement

Defined in

types.ts:347


namespace?

optional namespace: string

The namespace of this Editor. If two editors share the same namespace, JSON will be the clipboard interchange format. Otherwise HTML will be used.

Defined in

types.ts:333


nodes?

optional nodes: readonly (KlassConstructor<typeof LexicalNode> | LexicalNodeReplacement)[]

The nodes that this Plan adds to the Editor configuration, will be merged with other Plans

Defined in

types.ts:337


onError()?

optional onError: (error, editor) => void

The editor will catch errors that happen during updates and reconciliation and call this. It defaults to (error) => { throw error }.

Parameters

error: Error

The Error object

editor: LexicalEditor

The editor that this error came from

Returns

void

Defined in

types.ts:360


parentEditor?

optional parentEditor: LexicalEditor

Used when this editor is nested inside of another editor

Defined in

types.ts:327


theme?

optional theme: EditorThemeClasses

EditorThemeClasses that will be deep merged with other Plans

Defined in

types.ts:341