UNPKG

devexpress-richedit

Version:

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

18 lines (17 loc) 593 B
import { StringUtils } from '@devexpress/utils/lib/utils/string'; import { LeafElementDestination } from './destination'; export class PropertyDestination extends LeafElementDestination { setter; constructor(data, setter) { super(data); this.setter = setter; } async processElementOpen(reader) { let value = reader.getAttributeNS('val', reader.namespaceURI); if (value == null) value = reader.getAttribute('val'); if (StringUtils.isNullOrEmpty(value)) return; this.setter(value); } }