Skip to main content

@lexical/extension/InitialStateExtension

Interfaces

InitialStateConfig

Defined in: packages/lexical-extension/src/InitialStateExtension.ts:35

Properties

setOptions

setOptions: EditorSetOptions

Defined in: packages/lexical-extension/src/InitialStateExtension.ts:37

updateOptions

updateOptions: EditorUpdateOptions

Defined in: packages/lexical-extension/src/InitialStateExtension.ts:36

Variables

InitialStateExtension

const InitialStateExtension: LexicalExtension<InitialStateConfig, "@lexical/extension/InitialState", unknown, { $initialEditorState: InitialEditorStateType; initialized: boolean; }>

Defined in: packages/lexical-extension/src/InitialStateExtension.ts:49

An extension to set the initial state of the editor from a function or serialized JSON EditorState. This is implicitly included with all editors built with Lexical Extension. This happens in the afterRegistration phase so your initial state may depend on registered commands, but you should not call editor.setRootElement earlier than this phase to avoid rendering an empty editor first.