#842 Move table styles to the top

This commit is contained in:
Dolan Miu
2021-03-22 05:54:48 +00:00
parent 46846b6e6c
commit bc6644be0b

View File

@ -31,6 +31,10 @@ export class TableProperties extends IgnoreIfEmptyXmlComponent {
constructor(options: ITablePropertiesOptions) { constructor(options: ITablePropertiesOptions) {
super("w:tblPr"); super("w:tblPr");
if (options.style) {
this.root.push(new TableStyle(options.style));
}
this.root.push(new TableCellMargin(options.cellMargin || {})); this.root.push(new TableCellMargin(options.cellMargin || {}));
if (options.borders) { if (options.borders) {
@ -60,9 +64,5 @@ export class TableProperties extends IgnoreIfEmptyXmlComponent {
if (options.visuallyRightToLeft) { if (options.visuallyRightToLeft) {
this.root.push(new VisuallyRightToLeft()); this.root.push(new VisuallyRightToLeft());
} }
if (options.style) {
this.root.push(new TableStyle(options.style));
}
} }
} }