devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
18 lines (17 loc) • 863 B
JavaScript
import { TableHeightUnit, TableHeightUnitType } from '../../../../../model/tables/secondary-structures/table-units';
import { Pair } from '@devexpress/utils/lib/class/pair';
import { UnitConverter } from '@devexpress/utils/lib/class/unit-converter';
import { BaseFormatter, StdProps } from '../../base-formatter';
export class CCF_TableHeightUnit extends BaseFormatter {
isHandleObject(obj) {
return obj instanceof TableHeightUnit;
}
getShortDescription(_config) {
const list = [
new Pair("", TableHeightUnitType[this.curr.type] + ":"),
new Pair("", `${this.curr.value}(${UnitConverter.twipsToPixels(this.curr.value)}px)`),
];
return this.stdShow(new StdProps(list).showAsLine());
}
}
CCF_TableHeightUnit._foo = BaseFormatter.addToFormattersList(new CCF_TableHeightUnit());