Add styles to footnote

This commit is contained in:
Dolan
2018-06-28 03:01:25 +01:00
parent 802e461792
commit 5dc82d8176
7 changed files with 101 additions and 4 deletions

View File

@ -1,6 +1,7 @@
import { XmlComponent } from "file/xml-components";
import { Paragraph } from "../../paragraph";
import { FootnoteAttributes } from "./footnote-attributes";
import { FootnoteRefRun } from "./run/footnote-ref-run";
export class FootNote extends XmlComponent {
constructor(id: number, type?: string) {
@ -14,6 +15,7 @@ export class FootNote extends XmlComponent {
}
public addParagraph(paragraph: Paragraph): void {
paragraph.addRunToFront(new FootnoteRefRun());
this.root.push(paragraph);
}
}

View File

@ -0,0 +1,11 @@
import { Run } from "file/paragraph";
import { FootnoteRef } from "./footnote-ref";
export class FootnoteRefRun extends Run {
constructor() {
super();
this.style("FootnoteReference");
this.root.push(new FootnoteRef());
}
}

View File

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