Skip to main content

CAN_UNDO_COMMAND

const
const CAN_UNDO_COMMAND: LexicalCommand<boolean>

Import

import { CAN_UNDO_COMMAND } from '@modular/sdk/editor';

Notes

deprecated
in v0.49.0, use the `canUndo` signal from `HistoryExtension`. A command only reports a change, so a listener registered after the editor is initialized has no way to read the current value. The signal always holds it. Dispatched when the undo availability changes. Payload is true if undo is available.