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