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