#627 Add footnotes relationships

This commit is contained in:
Dolan Miu
2021-03-01 23:35:52 +00:00
parent c6e9696be0
commit f90e84a88d
12 changed files with 107 additions and 66 deletions

View File

@ -9,13 +9,18 @@ export enum FootnoteType {
CONTINUATION_SEPERATOR = "continuationSeparator",
}
export interface IFootnoteOptions {
readonly id: number;
readonly type?: FootnoteType;
}
export class Footnote extends XmlComponent {
constructor(id: number, type?: FootnoteType) {
constructor(options: IFootnoteOptions) {
super("w:footnote");
this.root.push(
new FootnoteAttributes({
type: type,
id: id,
type: options.type,
id: options.id,
}),
);
}