Files
docx-js/ts/styles/defaults/run-properties.ts

25 lines
736 B
TypeScript
Raw Normal View History

2017-03-09 09:45:01 +01:00
import { RunProperties } from "../../docx/run/properties";
import { XmlComponent } from "../../docx/xml-components";
import { RunFonts } from "../../docx/run/run-fonts";
import { Size } from "../../docx/run/formatting";
2016-04-09 02:04:53 +01:00
2016-04-09 20:16:35 +01:00
export class RunPropertiesDefaults extends XmlComponent {
private properties: RunProperties;
2016-04-09 20:16:35 +01:00
2016-04-09 02:04:53 +01:00
constructor() {
2016-04-09 20:16:35 +01:00
super("w:rPrDefault");
this.properties = new RunProperties();
this.root.push(this.properties);
}
public size(size: number): RunPropertiesDefaults {
this.properties.push(new Size(size));
return this;
}
public font(fontName: string): RunPropertiesDefaults {
this.properties.push(new RunFonts(fontName));
return this;
2016-04-09 02:04:53 +01:00
}
2017-03-09 09:45:01 +01:00
}