diff --git a/ts/docx/paragraph/tab-stop.ts b/ts/docx/paragraph/tab-stop.ts index 02b719510f..0a84eb81e6 100644 --- a/ts/docx/paragraph/tab-stop.ts +++ b/ts/docx/paragraph/tab-stop.ts @@ -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)); } } diff --git a/ts/docx/run/index.ts b/ts/docx/run/index.ts index 7081ccb979..9948368a7a 100644 --- a/ts/docx/run/index.ts +++ b/ts/docx/run/index.ts @@ -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; } } \ No newline at end of file diff --git a/ts/docx/run/tab.ts b/ts/docx/run/tab.ts new file mode 100644 index 0000000000..6d1aa48ecd --- /dev/null +++ b/ts/docx/run/tab.ts @@ -0,0 +1,8 @@ +import {XmlComponent} from "../xml-components"; + +export class Tab extends XmlComponent { + + constructor() { + super("w:tab"); + } +} \ No newline at end of file diff --git a/ts/docx/xml-components/attributes.ts b/ts/docx/xml-components/attributes.ts index 06e6aec788..37f3ca2c43 100644 --- a/ts/docx/xml-components/attributes.ts +++ b/ts/docx/xml-components/attributes.ts @@ -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); } } \ No newline at end of file