UNPKG

devexpress-richedit

Version:

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

17 lines (16 loc) 580 B
import { StringUtils } from '@devexpress/utils/lib/utils/string'; import { LeafElementDestination } from './destination'; export class PropertyDestination extends LeafElementDestination { 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); } }