I have been utilizing the html-docx-js module to convert html content into docx format. However, I am facing an issue where most of my CSS is externally loaded and html-docx-js does not apply any styles.
Here is a simplified code sample:
const html = '<html><head><link rel="stylesheet" type="text/css" href="/styles/page.css"></head><body><div className={bold}>I am bold!</div></body></html>'
saveAs(htmlDocx.asBlob(html), 'bold.docx');
I was advised to try using the juice library, but that solution did not work either.
Does anyone happen to know of a workaround to enable html-docx-js to load external CSS when generating a docx file?