Skip to main content

@lexical/react/LexicalOnChangePlugin

Functions

OnChangePlugin()

OnChangePlugin(__namedParameters): null

Defined in: packages/lexical-react/src/LexicalOnChangePlugin.ts:24

Calls onChange with the latest EditorState whenever the editor updates. By default, updates that only change the selection, and updates that are part of a history merge, are ignored; set ignoreSelectionChange or ignoreHistoryMergeTagChange to control that filtering.

Parameters

__namedParameters
ignoreHistoryMergeTagChange?

boolean = true

ignoreSelectionChange?

boolean = false

onChange

(editorState, editor, tags) => void

Returns

null

null, this plugin renders no DOM of its own.