Class: EditorState
lexical.EditorState
Constructors
constructor
• new EditorState(nodeMap
, selection?
)
Parameters
Name | Type |
---|---|
nodeMap | NodeMap |
selection? | null | RangeSelection | GridSelection | NodeSelection |
Defined in
lexical/src/LexicalEditorState.ts:103
Properties
_flushSync
• _flushSync: boolean
Defined in
lexical/src/LexicalEditorState.ts:100
_nodeMap
• _nodeMap: NodeMap
Defined in
lexical/src/LexicalEditorState.ts:98
_readOnly
• _readOnly: boolean
Defined in
lexical/src/LexicalEditorState.ts:101
_selection
• _selection: null
| RangeSelection
| GridSelection
| NodeSelection
Defined in
lexical/src/LexicalEditorState.ts:99
Methods
clone
▸ clone(selection?
): EditorState
Parameters
Name | Type |
---|---|
selection? | null | RangeSelection | GridSelection | NodeSelection |
Returns
Defined in
lexical/src/LexicalEditorState.ts:121
isEmpty
▸ isEmpty(): boolean
Returns
boolean
Defined in
lexical/src/LexicalEditorState.ts:113
read
▸ read<V
>(callbackFn
): V
Type parameters
Name |
---|
V |
Parameters
Name | Type |
---|---|
callbackFn | () => V |
Returns
V
Defined in
lexical/src/LexicalEditorState.ts:117
toJSON
▸ toJSON(): SerializedEditorState
<SerializedLexicalNode
>
Returns
SerializedEditorState
<SerializedLexicalNode
>
Defined in
lexical/src/LexicalEditorState.ts:132