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

31 lines
730 B
TypeScript
Raw Normal View History

2018-06-25 19:50:19 +01:00
import { Run } from "file/paragraph/run";
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
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 {
constructor(id: number) {
super("w:footnoteReference");
this.root.push(
new FootNoteReferenceRunAttributes({
id: id,
}),
);
}
}
export class FootnoteReferenceRun extends Run {
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));
}
}