Files
docx-js/src/file/paragraph/run/page-number.ts

15 lines
471 B
TypeScript
Raw Normal View History

import { SpaceType } from "file/space-type";
2018-05-12 20:04:54 -04:00
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
class TextAttributes extends XmlAttributeComponent<{ readonly space: SpaceType }> {
protected readonly xmlKeys = { space: "xml:space" };
2018-05-12 20:04:54 -04:00
}
export class Page extends XmlComponent {
constructor() {
super("w:instrText");
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
2018-05-12 20:04:54 -04:00
this.root.push("PAGE");
}
}