Releases: dolanmiu/docx
5.0.0-rc6
5.0.0-rc5
Major breaking changes
Declaritive API
It was a tough decision, but a lot of thought was put into it. Now the Paragraph API is more declaritive. Method chaining is now slowly being deprecated.
You can read more of why method chaining is bad here:
https://stackoverflow.com/questions/1103985/method-chaining-why-is-it-a-good-practice-or-not
https://softwareengineering.stackexchange.com/a/266585/249600
From this:
To this:
The reason for this is that, the code will not give a compile error if you do:
new Paragraph(text).heading1().heading2()
...but instead, it will break the Word document itself. This is clearly a design flaw and allows for potential bugs and issues.
Sections
Now at least one section is required per document. Check the demo folder for examples, and here for the documentation: https://docx.js.org/#/usage/sections
Static Packer
Packer is now static: #373
5.0.0-rc4
5.0.0-rc3
5.0.0-rc2
5.0.0-rc1
Breaking changes:
Tables are more intuative to use and well documented:
Rename some methods:
Swap arguments around:
Add .dotx
support:
Floating tables + margains:
Non-breaking changes:
#217
#205
#201
#197
#195
#220
#229
#202
Outline level: #248
e2e Testing! #246
Google docs left right margain support #276
Add cantSplit and tableHeaderRow properties into tables #275
#279
Add bold and italics to character style + customize hyperlink #278
Column merging #274
% missing from pct #282
Shading for table cell #292
Thanks you all for the contributions! Keep 'em coming!