Files
docx-js/ts/docx/run/index.ts
2016-05-17 23:37:36 +01:00

34 lines
730 B
TypeScript

import {XmlComponent, Attributes} from "../xml-components";
import {RunProperties} from "./properties";
import {Bold, Italics, Underline} from "./formatting";
export class Run extends XmlComponent {
private properties: RunProperties;
constructor() {
super("w:r");
this.properties = new RunProperties();
this.root.push(this.properties);
}
bold(): Run {
this.properties.push(new Bold());
return this;
}
italics(): Run {
this.properties.push(new Italics());
return this;
}
underline(): Run {
this.properties.push(new Underline());
return this;
}
break() : Run {
// TODO
return this;
}
}