UNPKG

devexpress-richedit

Version:

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

25 lines (24 loc) 1 kB
import { ModelScrollManager } from '../../scroll/model-scroll-manager'; import { CommandBase } from '../command-base'; import { SimpleCommandState } from '../command-states'; export class SelectAllDocumentCommand extends CommandBase { getState() { return new SimpleCommandState(this.isEnabled()); } executeCore(_state, _options) { if (!this.control.layout.isFullyFormatted) this.control.layoutFormatterManager.formatSyncAllDocument(); this.selection.deprecatedSetSelection(0, this.selection.activeSubDocument.getDocumentEndPosition(), true, -1, true, true, true, ModelScrollManager.DontChangeScrollPosition); this.control.focusManager.captureFocus(); return true; } beforeExecute() { this.control.screenReaderManager.beginExecute(this.commandId); } afterExecute() { this.control.screenReaderManager.endExecute(); } isEnabledInReadOnlyMode() { return true; } }