UNPKG

devexpress-richedit

Version:

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

13 lines (12 loc) 599 B
import { SpellingErrorType } from '../../spelling/spell-checker'; import { SpellingCommandBase } from './spelling-command-base'; export class IgnoreAllSpellingErrorsCommand extends SpellingCommandBase { isVisible(selectedMisspelledInterval) { return super.isVisible(selectedMisspelledInterval) && selectedMisspelledInterval.errorInfo.errorType == SpellingErrorType.Misspelling; } executeCore(state, _options) { let selectedMisspelledInterval = state.value; this.control.spellChecker.ignoreAll(selectedMisspelledInterval); return true; } }