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:107
Properties
_flushSync
• _flushSync: boolean
Defined in
packages/lexical/src/LexicalEditorState.ts:104
_nodeMap
• _nodeMap: NodeMap
Defined in
packages/lexical/src/LexicalEditorState.ts:102
_readOnly
• _readOnly: boolean
Defined in
packages/lexical/src/LexicalEditorState.ts:105
_selection
• _selection: null
| BaseSelection
Defined in
packages/lexical/src/LexicalEditorState.ts:103
Methods
clone
▸ clone(selection?
): EditorState
Parameters
Name | Type |
---|---|
selection? | null | BaseSelection |
Returns
Defined in
packages/lexical/src/LexicalEditorState.ts:126
isEmpty
▸ isEmpty(): boolean
Returns
boolean
Defined in
packages/lexical/src/LexicalEditorState.ts:114
read
▸ read<V
>(callbackFn
, options?
): V
Type parameters
Name |
---|
V |
Parameters
Name | Type |
---|---|
callbackFn | () => V |
options? | EditorStateReadOptions |
Returns
V
Defined in
packages/lexical/src/LexicalEditorState.ts:118
toJSON
▸ toJSON(): SerializedEditorState
<SerializedLexicalNode
>
Returns
SerializedEditorState
<SerializedLexicalNode
>