added new run methods

This commit is contained in:
Dolan Miu
2016-07-12 08:25:53 +01:00
parent 122c87ddf8
commit ed4f7464e0
6 changed files with 89 additions and 12 deletions

View File

@ -3,6 +3,9 @@ import {RunProperties} from "./properties";
import {Bold, Italics, Underline} from "./formatting";
import {Tab} from "./tab";
import {Break} from "./break";
import {SmallCaps, Caps} from "./caps";
import {Strike, DoubleStrike} from "./strike";
import {SubScript, SuperScript} from "./script";
export class Run extends XmlComponent {
private properties: RunProperties;
@ -38,4 +41,34 @@ export class Run extends XmlComponent {
this.root.splice(1, 0, new Tab());
return this;
}
smallCaps(): Run {
this.properties.push(new SmallCaps());
return this;
}
allCaps(): Run {
this.properties.push(new Caps());
return this;
}
strike(): Run {
this.properties.push(new Strike());
return this;
}
doubleStrike(): Run {
this.properties.push(new DoubleStrike());
return this;
}
subScript(): Run {
this.properties.push(new SubScript());
return this;
}
superScript(): Run {
this.properties.push(new SuperScript());
return this;
}
}