Add footnote classes

This commit is contained in:
Dolan
2018-06-25 19:50:19 +01:00
parent 99290d646e
commit 044442b0d7
5 changed files with 69 additions and 0 deletions

View File

@ -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());
}
}

View File

@ -0,0 +1,7 @@
import { XmlComponent } from "file/xml-components";
export class ContinuationSeperator extends XmlComponent {
constructor() {
super("w:continuationSeparator");
}
}

View 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));
}
}

View 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());
}
}

View File

@ -0,0 +1,7 @@
import { XmlComponent } from "file/xml-components";
export class Seperator extends XmlComponent {
constructor() {
super("w:separator");
}
}