devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
13 lines (12 loc) • 590 B
JavaScript
import { StringUtils } from '@devexpress/utils/lib/utils/string';
import { LeafElementDestination } from '../destination';
export class RunStyleReferenceBaseDestination extends LeafElementDestination {
async processElementOpen(reader) {
const styleId = reader.getAttributeNS('val', this.data.constants.wordProcessingNamespaceConst);
if (!StringUtils.isNullOrEmpty(styleId)) {
const style = this.data.stylesImporter.characterManager.getStyleById(styleId);
if (style)
this.assignCharacterStyle(style);
}
}
}