Files
docx-js/src/file/footnotes/footnote/run/reference-run.ts
2022-08-31 07:52:27 +01:00

31 lines
746 B
TypeScript

import { Run } from "@file/paragraph/run";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
export class FootNoteReferenceRunAttributes extends XmlAttributeComponent<{
readonly id: number;
}> {
protected readonly xmlKeys = {
id: "w:id",
};
}
export class FootnoteReference extends XmlComponent {
public constructor(id: number) {
super("w:footnoteReference");
this.root.push(
new FootNoteReferenceRunAttributes({
id: id,
}),
);
}
}
export class FootnoteReferenceRun extends Run {
public constructor(id: number) {
super({ style: "FootnoteReference" });
this.root.push(new FootnoteReference(id));
}
}