Skip to main content

Type Alias: InitialEditorStateType

InitialEditorStateType: null | string | EditorState | (editor) => void

All of the possible ways to initialize $initialEditorState:

  • null an empty state, the default
  • string an EditorState serialized to JSON
  • EditorState an EditorState that has been deserialized already (not just parsed JSON)
  • ((editor: LexicalEditor) => void) A function that is called with the editor for you to mutate it

Defined in

lexical-builder-core/dist/types.d.ts:222