devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
32 lines (31 loc) • 1.44 kB
JavaScript
import { Paragraph } from '../../../../model/paragraph/paragraph';
import { Pair } from '@devexpress/utils/lib/class/pair';
import { BaseFormatter, StdProps } from '../base-formatter';
export class CCF_Paragraph extends BaseFormatter {
isHandleObject(obj) {
return obj instanceof Paragraph;
}
getShortDescription(_config) {
return this.stdShow(new StdProps([
new Pair("pos", this.curr.startLogPosition.value),
new Pair("len", this.curr.length),
]).showAsLine());
}
availableFullDescription(_config) {
return true;
}
getFullDescription(_config) {
return this.stdShow(new StdProps([
new Pair("position", this.curr.startLogPosition.value),
new Pair("length", this.curr.length),
new Pair("endPos", this.curr.getEndPosition()),
new Pair("numberingListIndex", this.curr.numberingListIndex),
new Pair("listLevelIndex", this.curr.listLevelIndex),
new Pair("maskedParagraphProperties", this.curr.maskedParagraphProperties),
new Pair("tabs", this.curr.tabs),
new Pair("subDocument", this.curr.subDocument),
new Pair("text", this.getSubDocumentText(this.curr.subDocument.id, this.curr.interval).setLen(60)),
]).showAsColumn());
}
}
CCF_Paragraph._foo = BaseFormatter.addToFormattersList(new CCF_Paragraph());