Moved addTableOfContents to File and creating a settings.xml and applying updateFields=true when there is a table of contents
This commit is contained in:
@ -1,14 +1,18 @@
|
||||
// import { TableOfContentsProperties } from "./properties";
|
||||
import { Paragraph } from "file/paragraph";
|
||||
import { ParagraphProperties } from "file/paragraph";
|
||||
import { Run } from "file/paragraph/run";
|
||||
import { Begin, End, Separate } from "file/paragraph/run/field";
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
import { TableOfContentsInstruction } from "./instruction";
|
||||
|
||||
export class TableOfContents extends Paragraph {
|
||||
export class TableOfContents extends XmlComponent {
|
||||
// private readonly tocProperties: TableOfContentsProperties;
|
||||
private readonly properties: ParagraphProperties;
|
||||
|
||||
constructor(/*tocProperties?: TableOfContentsProperties*/) {
|
||||
super();
|
||||
super("w:p");
|
||||
this.properties = new ParagraphProperties();
|
||||
this.root.push(this.properties);
|
||||
// this.tocProperties = tocProperties || new TableOfContentsProperties();
|
||||
const firstRun = new Run();
|
||||
firstRun.addChildElement(new Begin());
|
||||
|
Reference in New Issue
Block a user