Add styles to footnote
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
11
src/file/footnotes/footnote/run/footnote-ref-run.ts
Normal file
11
src/file/footnotes/footnote/run/footnote-ref-run.ts
Normal 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());
|
||||
}
|
||||
}
|
7
src/file/footnotes/footnote/run/footnote-ref.ts
Normal file
7
src/file/footnotes/footnote/run/footnote-ref.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
|
||||
export class FootnoteRef extends XmlComponent {
|
||||
constructor() {
|
||||
super("w:footnoteRef");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user