added italics and underline

This commit is contained in:
Dolan Miu
2016-03-30 04:43:56 +01:00
parent 26f30b06d2
commit 4f4653200e
2 changed files with 32 additions and 5 deletions

View File

@ -1,6 +1,6 @@
import {XmlComponent, Attributes} from "../xml-components";
import {RunProperties} from "./properties";
import {Bold} from "./emphasis";
import {Bold, Italics, Underline} from "./emphasis";
export class Run implements XmlComponent {
protected r: Array<XmlComponent>;
@ -11,9 +11,19 @@ export class Run implements XmlComponent {
this.properties = new RunProperties();
this.r.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;
}
}