From bc6644be0bdcdafb7ba50dad10c21401d57a71a4 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Mon, 22 Mar 2021 05:54:48 +0000 Subject: [PATCH] #842 Move table styles to the top --- src/file/table/table-properties/table-properties.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/file/table/table-properties/table-properties.ts b/src/file/table/table-properties/table-properties.ts index 67fa8e3f5f..cd0341a6ac 100644 --- a/src/file/table/table-properties/table-properties.ts +++ b/src/file/table/table-properties/table-properties.ts @@ -31,6 +31,10 @@ export class TableProperties extends IgnoreIfEmptyXmlComponent { constructor(options: ITablePropertiesOptions) { super("w:tblPr"); + if (options.style) { + this.root.push(new TableStyle(options.style)); + } + this.root.push(new TableCellMargin(options.cellMargin || {})); if (options.borders) { @@ -60,9 +64,5 @@ export class TableProperties extends IgnoreIfEmptyXmlComponent { if (options.visuallyRightToLeft) { this.root.push(new VisuallyRightToLeft()); } - - if (options.style) { - this.root.push(new TableStyle(options.style)); - } } }