Skip to main content

InitialEditorStateType

type

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

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

Import

import { InitialEditorStateType } from '@modular/sdk/editor';