Files
docx-js/src/file/paragraph/run/style.ts

13 lines
385 B
TypeScript
Raw Normal View History

import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
2017-03-12 17:35:15 +01:00
class StyleAttributes extends XmlAttributeComponent<{ readonly val: string }> {
protected readonly xmlKeys = { val: "w:val" };
2017-03-12 17:35:15 +01:00
}
export class Style extends XmlComponent {
constructor(styleId: string) {
super("w:rStyle");
2018-01-23 01:33:12 +00:00
this.root.push(new StyleAttributes({ val: styleId }));
2017-03-12 17:35:15 +01:00
}
}