added working tabing
This commit is contained in:
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
8
ts/docx/run/tab.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import {XmlComponent} from "../xml-components";
|
||||
|
||||
export class Tab extends XmlComponent {
|
||||
|
||||
constructor() {
|
||||
super("w:tab");
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user