devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
36 lines (35 loc) • 1.64 kB
JavaScript
import { SubDocumentInfoType } from '../../../../model/enums';
import { SubDocument } from '../../../../model/sub-document';
import { Pair } from '@devexpress/utils/lib/class/pair';
import { BaseFormatter, StdProps } from '../base-formatter';
export class CCF_SubDocument extends BaseFormatter {
isHandleObject(obj) {
return obj instanceof SubDocument;
}
getShortDescription(_config) {
return this.stdShow(new StdProps([
new Pair("id", this.curr.id),
new Pair("type", SubDocumentInfoType[this.curr.info.getType()])
]).showAsLine());
}
availableFullDescription(_config) {
return true;
}
getFullDescription(_config) {
return this.stdShow(new StdProps([
new Pair("id", this.curr.id),
new Pair("type", SubDocumentInfoType[this.curr.info.getType()]),
new Pair("endPos", this.curr.getDocumentEndPosition()),
new Pair("paragraphs", this.curr.paragraphs),
new Pair("chunks", this.curr.chunks),
new Pair("fields", this.curr.fields),
new Pair("tables", this.curr.tables),
new Pair("rangePermissions", this.curr.availableRangePermissions),
new Pair("tablesByLevels", this.curr.tablesByLevels),
new Pair("text", this.getSubDocumentText(this.curr.id).setLen(60)),
new Pair("bookmarks", this.curr.bookmarks),
new Pair("positionManager", this.curr.positionManager),
]).showAsColumn());
}
}
CCF_SubDocument._foo = BaseFormatter.addToFormattersList(new CCF_SubDocument());