Skip to main content

@lexical/react/LexicalHistoryPlugin

Functions

HistoryPlugin()

HistoryPlugin(__namedParameters): null

Defined in: packages/lexical-react/src/LexicalHistoryPlugin.ts:30

Adds undo/redo support to the editor by tracking changes in a HistoryState. Pass delay to control how long (in milliseconds) consecutive changes are merged into a single history entry, or externalHistoryState to share a history stack across editors.

This is a legacy plugin. When building an editor with the extension API, configure HistoryExtension instead.

Parameters

__namedParameters
delay?

number

externalHistoryState?

HistoryState

Returns

null

null, this plugin renders no DOM of its own.

References

createEmptyHistoryState

Re-exports createEmptyHistoryState


HistoryState

Re-exports HistoryState