Turn Run into a declaritive API
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user