added #style method to runs

This commit is contained in:
felipe
2017-03-12 17:35:15 +01:00
parent 3dbd917667
commit 90049a31ee
3 changed files with 31 additions and 0 deletions

13
ts/docx/run/style.ts Normal file
View File

@ -0,0 +1,13 @@
import { XmlAttributeComponent, XmlComponent } from "../xml-components";
class StyleAttributes extends XmlAttributeComponent<{val: string}> {
protected xmlKeys = {val: "w:val"};
}
export class Style extends XmlComponent {
constructor(styleId: string) {
super("w:rStyle");
this.root.push(new StyleAttributes({val: styleId}));
}
}