added working tabing

This commit is contained in:
Dolan Miu
2016-06-10 15:03:44 +01:00
parent a2284df881
commit efce7731e6
4 changed files with 13 additions and 3 deletions

View File

@ -21,7 +21,7 @@ class Tab extends XmlComponent {
export class MaxRightTabStop extends TabStop {
constructor() {
super(new Tab("right", "RIGHT_MARGIN"));
super(new Tab("right", 9026));
}
}

View File

@ -1,6 +1,7 @@
import {XmlComponent, Attributes} from "../xml-components";
import {RunProperties} from "./properties";
import {Bold, Italics, Underline} from "./formatting";
import {Tab} from "./tab";
export class Run extends XmlComponent {
private properties: RunProperties;
@ -33,7 +34,7 @@ export class Run extends XmlComponent {
}
tab(): Run {
// TODO
this.root.splice(1, 0, new Tab());
return this;
}
}

8
ts/docx/run/tab.ts Normal file
View File

@ -0,0 +1,8 @@
import {XmlComponent} from "../xml-components";
export class Tab extends XmlComponent {
constructor() {
super("w:tab");
}
}

View File

@ -43,7 +43,8 @@ export class Attributes extends XmlAttributeComponent {
header: "w:header",
footer: "w:footer",
gutter: "w:gutter",
linePitch: "w:linePitch"
linePitch: "w:linePitch",
pos: "w:pos"
}, properties);
}
}