Declarative tables

This commit is contained in:
Dolan
2019-09-13 00:51:20 +01:00
parent 59fc1ed632
commit 418adca9f3
21 changed files with 978 additions and 536 deletions

View File

@ -2,9 +2,11 @@
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
export class TableGrid extends XmlComponent {
constructor(cols: number[]) {
constructor(widths: number[]) {
super("w:tblGrid");
cols.forEach((col) => this.root.push(new GridCol(col)));
for (const width of widths) {
this.root.push(new GridCol(width));
}
}
}