devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
10 lines (9 loc) • 466 B
JavaScript
import { FixedInterval } from '@devexpress/utils/lib/intervals/fixed';
import { CommandBase } from '../command-base';
export class TableCommandBase extends CommandBase {
isEnabled() {
const table = this.control.selection.tableInfo.table;
return super.isEnabled() && table != null &&
this.control.selection.activeSubDocument.isEditable([FixedInterval.fromPositions(table.getStartPosition(), table.getEndPosition())]);
}
}