Turn Run into a declaritive API

This commit is contained in:
Dolan
2019-06-17 01:51:57 +01:00
parent a1cd5e9573
commit fb65bb4207
27 changed files with 411 additions and 183 deletions

View File

@ -17,7 +17,7 @@ export class TableOfContents extends XmlComponent {
const content = new StructuredDocumentTagContent();
const beginParagraph = new Paragraph({});
const beginRun = new Run();
const beginRun = new Run({});
beginRun.addChildElement(new Begin(true));
beginRun.addChildElement(new FieldInstruction(properties));
beginRun.addChildElement(new Separate());
@ -25,7 +25,7 @@ export class TableOfContents extends XmlComponent {
content.addChildElement(beginParagraph);
const endParagraph = new Paragraph({});
const endRun = new Run();
const endRun = new Run({});
endRun.addChildElement(new End());
endParagraph.addRun(endRun);
content.addChildElement(endParagraph);