Interface: UpdateListenerPayload
lexical.UpdateListenerPayload
The payload passed to an UpdateListener
Properties
dirtyElements
• dirtyElements: Map
<string
, boolean
>
A Map of NodeKeys of ElementNodes to a boolean that is true if the node was intentionally mutated ('unintentional' mutations are triggered when an indirect descendant is marked dirty)
Defined in
packages/lexical/src/LexicalEditor.ts:243
dirtyLeaves
• dirtyLeaves: Set
<string
>
A Set of NodeKeys of all nodes that were marked dirty that do not inherit from ElementNode.
Defined in
packages/lexical/src/LexicalEditor.ts:248
editorState
• editorState: EditorState
The new EditorState after all updates have been processed,
equivalent to editor.getEditorState()
Defined in
packages/lexical/src/LexicalEditor.ts:253
mutatedNodes
• mutatedNodes: null
| MutatedNodes
The Map of LexicalNode constructors to a Map<NodeKey, NodeMutation>
,
this is useful when you have a mutation listener type use cases that
should apply to all or most nodes. Will be null if no DOM was mutated,
such as when only the selection changed.
Added in v0.28.0
Defined in
packages/lexical/src/LexicalEditor.ts:262
normalizedNodes
• normalizedNodes: Set
<string
>
For advanced use cases only.
Tracks the keys of TextNode descendants that have been merged with their siblings by normalization. Note that these keys may not exist in either editorState or prevEditorState and generally this is only used for conflict resolution edge cases in collab.
Defined in
packages/lexical/src/LexicalEditor.ts:271
prevEditorState
• prevEditorState: EditorState
The previous EditorState that is being discarded
Defined in
packages/lexical/src/LexicalEditor.ts:275
tags
• tags: Set
<string
>
The set of tags added with update options or $addUpdateTag, node that this includes all tags that were processed in this reconciliation which may have been added by separate updates.