UNPKG

devexpress-richedit

Version:

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

27 lines (26 loc) 1.1 kB
import { StringValueDestination } from '../base/string-value-destination'; import { DestinationType } from '../utils/destination-type'; export class ListLevelTextDestination extends StringValueDestination { get destinationType() { return DestinationType.ListLevelTextDestination; } get controlCharHT() { return null; } levelTemplateId = 0; createEmptyClone() { return new ListLevelTextDestination(this.importer); } createClone() { const clone = super.createClone(); clone.levelTemplateId = this.levelTemplateId; return clone; } beforeNestedGroupFinished(nestedDestination) { super.beforeNestedGroupFinished(nestedDestination); this._value = nestedDestination.value; } static onListLevelTemplateIdKeyword(importer, parameterValue, hasParameter) { importer.destination.levelTemplateId = hasParameter ? ListLevelTextDestination.fixLevelTemplateId(parameterValue) : 0; } static fixLevelTemplateId(levelTemplateId) { return Math.abs(levelTemplateId); } }