Add footnote support to API
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
// http://officeopenxml.com/WPparagraph.php
|
||||
import { FootnoteReferenceRun } from "file/footnotes/footnote/run/reference-run";
|
||||
import { IMediaData } from "file/media";
|
||||
import { Num } from "file/numbering/num";
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
import { PictureRun, Run, TextRun } from "./run";
|
||||
|
||||
import { Alignment } from "./formatting/alignment";
|
||||
import { ThematicBreak } from "./formatting/border";
|
||||
@ -15,6 +15,7 @@ import { CenterTabStop, LeftTabStop, MaxRightTabStop, RightTabStop } from "./for
|
||||
import { NumberProperties } from "./formatting/unordered-list";
|
||||
import { Hyperlink } from "./links";
|
||||
import { ParagraphProperties } from "./properties";
|
||||
import { PictureRun, Run, TextRun } from "./run";
|
||||
|
||||
export class Paragraph extends XmlComponent {
|
||||
private properties: ParagraphProperties;
|
||||
@ -181,4 +182,9 @@ export class Paragraph extends XmlComponent {
|
||||
this.properties.push(new KeepLines());
|
||||
return this;
|
||||
}
|
||||
|
||||
public referenceFootnote(id: number): Paragraph {
|
||||
this.root.push(new FootnoteReferenceRun(id));
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import { Underline } from "./underline";
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
|
||||
export class Run extends XmlComponent {
|
||||
private properties: RunProperties;
|
||||
protected properties: RunProperties;
|
||||
|
||||
constructor() {
|
||||
super("w:r");
|
||||
|
Reference in New Issue
Block a user