UpdateListenerPayload
interfaceThe payload passed to an UpdateListener
Import
import { UpdateListenerPayload } from '@modular/sdk/editor';Members7
- dirtyElements
Map<NodeKey, IntentionallyMarkedAsDirtyElement>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)
- dirtyLeaves
Set<NodeKey>A Set of NodeKeys of all nodes that were marked dirty that do not inherit from ElementNode.
- editorState
EditorStateThe new EditorState after all updates have been processed, equivalent to `editor.getEditorState()`
- mutatedNodes
null | MutatedNodesThe 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. Note that this will be empty unless at least one MutationListener is explicitly registered (any MutationListener is sufficient to compute the mutatedNodes Map for all nodes). Added in v0.28.0
- normalizedNodes
Set<NodeKey>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.
- prevEditorState
EditorStateThe previous EditorState that is being discarded
- 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.