dolanmiu / docx

Easily generate and modify .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
https://docx.js.org/
MIT License
4.44k stars 486 forks source link

"Styling with XML" Heading definition not taking effect #2702

Open gy9527 opened 4 months ago

gy9527 commented 4 months ago

I need to define styles using XML. So, I tested this example code (demo/13-xml-styles.ts), but the example didn't execute as expected: line 15 of the code didn't take effect, it only generated the body format.

For this sample code, if I don't use "externalStyles," line 15 of the code works; however, after introducing XML-defined styles, the "heading" definition becomes ineffective.