Class: EditorState
lexical.EditorState
Constructors
constructor
• new EditorState(nodeMap
, selection?
): EditorState
Parameters
Name | Type |
---|---|
nodeMap | NodeMap |
selection? | null | BaseSelection |
Returns
Defined in
packages/lexical/src/LexicalEditorState.ts:101
Properties
_flushSync
• _flushSync: boolean
Defined in
packages/lexical/src/LexicalEditorState.ts:98
_nodeMap
• _nodeMap: NodeMap
Defined in
packages/lexical/src/LexicalEditorState.ts:96
_readOnly
• _readOnly: boolean
Defined in
packages/lexical/src/LexicalEditorState.ts:99
_selection
• _selection: null
| BaseSelection
Defined in
packages/lexical/src/LexicalEditorState.ts:97
Methods
clone
▸ clone(selection?
): EditorState
Parameters
Name | Type |
---|---|
selection? | null | BaseSelection |
Returns
Defined in
packages/lexical/src/LexicalEditorState.ts:116
isEmpty
▸ isEmpty(): boolean
Returns
boolean
Defined in
packages/lexical/src/LexicalEditorState.ts:108
read
▸ read<V
>(callbackFn
): V
Type parameters
Name |
---|
V |
Parameters
Name | Type |
---|---|
callbackFn | () => V |
Returns
V
Defined in
packages/lexical/src/LexicalEditorState.ts:112
toJSON
▸ toJSON(): SerializedEditorState
<SerializedLexicalNode
>
Returns
SerializedEditorState
<SerializedLexicalNode
>