Add footer
This commit is contained in:
@ -0,0 +1,13 @@
|
||||
import { XmlAttributeComponent } from "file/xml-components";
|
||||
|
||||
export interface IFooterReferenceAttributes {
|
||||
type: string;
|
||||
id: string;
|
||||
}
|
||||
|
||||
export class FooterReferenceAttributes extends XmlAttributeComponent<IFooterReferenceAttributes> {
|
||||
protected xmlKeys = {
|
||||
type: "w:type",
|
||||
id: "r:id",
|
||||
};
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
import { FooterReferenceAttributes } from "./footer-reference-attributes";
|
||||
|
||||
export class FooterReference extends XmlComponent {
|
||||
constructor() {
|
||||
super("w:footerReference");
|
||||
this.root.push(
|
||||
new FooterReferenceAttributes({
|
||||
type: "default",
|
||||
id: `rId${4}`,
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@ import { Columns } from "./columns/columns";
|
||||
import { IColumnsAttributes } from "./columns/columns-attributes";
|
||||
import { DocumentGrid } from "./doc-grid/doc-grid";
|
||||
import { IDocGridAttributesProperties } from "./doc-grid/doc-grid-attributes";
|
||||
import { FooterReference } from "./footer-reference/footer-reference";
|
||||
import { HeaderReference } from "./header-reference/header-reference";
|
||||
import { PageMargin } from "./page-margin/page-margin";
|
||||
import { IPageMarginAttributes } from "./page-margin/page-margin-attributes";
|
||||
@ -51,5 +52,6 @@ export class SectionProperties extends XmlComponent {
|
||||
this.root.push(new Columns(mergedOptions.space));
|
||||
this.root.push(new DocumentGrid(mergedOptions.linePitch));
|
||||
this.root.push(new HeaderReference());
|
||||
this.root.push(new FooterReference());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user