Files
docx-js/src/file/paragraph/run/page-number.ts
2023-12-29 23:52:43 +00:00

37 lines
1.0 KiB
TypeScript

import { SpaceType } from "@file/shared";
import { XmlComponent } from "@file/xml-components";
import { TextAttributes } from "./text-attributes";
export class Page extends XmlComponent {
public constructor() {
super("w:instrText");
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
this.root.push("PAGE");
}
}
export class NumberOfPages extends XmlComponent {
public constructor() {
super("w:instrText");
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
this.root.push("NUMPAGES");
}
}
export class NumberOfPagesSection extends XmlComponent {
public constructor() {
super("w:instrText");
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
this.root.push("SECTIONPAGES");
}
}
export class CurrentSection extends XmlComponent {
public constructor() {
super("w:instrText");
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
this.root.push("SECTION");
}
}