Add footnote classes
This commit is contained in:
@ -0,0 +1,10 @@
|
||||
import { Run } from "file/paragraph";
|
||||
import { ContinuationSeperator } from "./continuation-seperator";
|
||||
|
||||
export class ContinuationSeperatorRun extends Run {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.root.push(new ContinuationSeperator());
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
|
||||
export class ContinuationSeperator extends XmlComponent {
|
||||
constructor() {
|
||||
super("w:continuationSeparator");
|
||||
}
|
||||
}
|
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));
|
||||
}
|
||||
}
|
10
src/file/footnotes/footnote/run/seperator-run.ts
Normal file
10
src/file/footnotes/footnote/run/seperator-run.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { Run } from "file/paragraph";
|
||||
import { Seperator } from "./seperator";
|
||||
|
||||
export class SeperatorRun extends Run {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.root.push(new Seperator());
|
||||
}
|
||||
}
|
7
src/file/footnotes/footnote/run/seperator.ts
Normal file
7
src/file/footnotes/footnote/run/seperator.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
|
||||
export class Seperator extends XmlComponent {
|
||||
constructor() {
|
||||
super("w:separator");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user