devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
14 lines (13 loc) • 515 B
JavaScript
import { LeafElementDestination } from '../destination';
export class TableStyleDestination extends LeafElementDestination {
constructor(data, table) {
super(data);
this.table = table;
}
async processElementOpen(reader) {
const styleId = reader.getAttributeNS('val', this.data.constants.wordProcessingNamespaceConst);
const style = this.data.stylesImporter.tableManager.getStyleById(styleId);
if (style)
this.table.style = style;
}
}