Files
docx-js/src/file/footnotes/footnote/run/reference-run.ts

31 lines
746 B
TypeScript
Raw Normal View History

import { Run } from "@file/paragraph/run";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
2018-06-25 19:50:19 +01:00
2020-01-01 20:22:42 +00:00
export class FootNoteReferenceRunAttributes extends XmlAttributeComponent<{
readonly id: number;
2020-01-01 20:22:42 +00:00
}> {
protected readonly xmlKeys = {
2018-06-25 19:50:19 +01:00
id: "w:id",
};
}
export class FootnoteReference extends XmlComponent {
2022-08-31 07:52:27 +01:00
public constructor(id: number) {
2018-06-25 19:50:19 +01:00
super("w:footnoteReference");
this.root.push(
new FootNoteReferenceRunAttributes({
id: id,
}),
);
}
}
export class FootnoteReferenceRun extends Run {
2022-08-31 07:52:27 +01:00
public constructor(id: number) {
2021-05-24 17:12:10 +03:00
super({ style: "FootnoteReference" });
2018-06-25 19:50:19 +01:00
this.root.push(new FootnoteReference(id));
}
}