Declarative hyperlinks, bookmarks, tab stops and page breaks

This commit is contained in:
Dolan
2019-09-30 22:56:21 +01:00
parent d2dded860d
commit 04b6d8e54a
20 changed files with 207 additions and 165 deletions

View File

@ -16,18 +16,24 @@ export class TableOfContents extends XmlComponent {
const content = new StructuredDocumentTagContent();
const beginParagraph = new Paragraph({});
const beginRun = new Run({});
beginRun.addChildElement(new Begin(true));
beginRun.addChildElement(new FieldInstruction(properties));
beginRun.addChildElement(new Separate());
beginParagraph.addRun(beginRun);
const beginParagraph = new Paragraph({
children: [
new Run({
children: [new Begin(true), new FieldInstruction(properties), new Separate()],
}),
],
});
content.addChildElement(beginParagraph);
const endParagraph = new Paragraph({});
const endRun = new Run({});
endRun.addChildElement(new End());
endParagraph.addRun(endRun);
const endParagraph = new Paragraph({
children: [
new Run({
children: [new End()],
}),
],
});
content.addChildElement(endParagraph);
this.root.push(content);