first simple version of TOC working

This commit is contained in:
Sergio Mendonça
2018-09-03 11:20:36 -03:00
parent a367951d07
commit b1711ae293
3 changed files with 53 additions and 3 deletions

View File

@ -1,5 +1,7 @@
// import { TableOfContentsProperties } from "./properties";
import { Paragraph } from "../paragraph";
import { Paragraph } from "file/paragraph";
import { Begin, End, Separate } from "file/paragraph/run/field";
import { TableOfContentsInstruction } from "./instruction";
export class TableOfContents extends Paragraph {
// private readonly tocProperties: TableOfContentsProperties;
@ -7,5 +9,9 @@ export class TableOfContents extends Paragraph {
constructor(/*tocProperties?: TableOfContentsProperties*/) {
super();
// this.tocProperties = tocProperties || new TableOfContentsProperties();
this.root.push(new Begin());
this.root.push(new Separate());
this.root.push(new TableOfContentsInstruction());
this.root.push(new End());
}
}