Add footnote classes
This commit is contained in:
35
src/file/footnotes/footnote/run/reference-run.ts
Normal file
35
src/file/footnotes/footnote/run/reference-run.ts
Normal file
@ -0,0 +1,35 @@
|
||||
import { Run } from "file/paragraph/run";
|
||||
import { Style } from "file/paragraph/run/style";
|
||||
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||
|
||||
export interface IFootNoteReferenceRunAttributesProperties {
|
||||
id: number;
|
||||
}
|
||||
|
||||
export class FootNoteReferenceRunAttributes extends XmlAttributeComponent<IFootNoteReferenceRunAttributesProperties> {
|
||||
protected xmlKeys = {
|
||||
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) {
|
||||
super();
|
||||
|
||||
this.properties.push(new Style("FootnoteReference"));
|
||||
|
||||
this.root.push(new FootnoteReference(id));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user