UNPKG

devexpress-richedit

Version:

DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.

22 lines (21 loc) 679 B
import { ControlOptions } from '../model/options/control'; import { CommandBase } from './command-base'; import { SimpleCommandState } from './command-states'; export class RedoCommand extends CommandBase { getState() { return new SimpleCommandState(this.isEnabled() && this.history.canRedo()); } isEnabled() { return super.isEnabled() && ControlOptions.isEnabled(this.control.modelManager.richOptions.control.undo); } executeCore(state, _options) { if (state.enabled) { this.history.redo(); return true; } return false; } canModify() { return true; } }