Files
docx-js/src/file/document/body/section-properties/footer-reference/footer-reference.ts

21 lines
601 B
TypeScript
Raw Normal View History

2018-01-29 21:53:22 +00:00
import { XmlComponent } from "file/xml-components";
import { FooterReferenceAttributes, FooterReferenceType } from "./footer-reference-attributes";
2018-06-22 23:04:03 +01:00
export interface IFooterOptions {
footerType?: FooterReferenceType;
footerId?: number;
}
2018-01-29 21:53:22 +00:00
export class FooterReference extends XmlComponent {
2018-06-22 23:04:03 +01:00
constructor(options: IFooterOptions) {
2018-01-29 21:53:22 +00:00
super("w:footerReference");
2018-01-29 21:53:22 +00:00
this.root.push(
new FooterReferenceAttributes({
type: options.footerType || FooterReferenceType.DEFAULT,
id: `rId${options.footerId}`,
2018-01-29 21:53:22 +00:00
}),
);
}
}