【发布时间】:2021-11-04 11:10:14
【问题描述】:
我在将 HTML 文本转换为 word doc 支持格式时遇到问题,因此我可以使用 docx.js lib 生成 doc 文件。现在 HTML 标签显示为计划文本。
这是我正在使用的库:https://docx.js.org/
<p>
<strong>voice:</strong>
During an address to Congress, George Washington said “If you can’t send money, send cigars.” [pause] Or something like that. [pause] There’s no question that Washington was a wise man. He knew that premium quality cigars are worth their weight in gold. And if he were alive today, he’d be running the country from the lounge at
<strong>No Name Cigar Company.</strong>
Where the conversation never comes to an end – and neither does their premier cigar selection. Mingle with legends – at
<strong>No Name Cigar Company.</strong>
</p>
<p> </p>
<p>Visit them online at <strong>NoNameWebsite.com</strong></p>`
【问题讨论】:
-
阅读文档
-
通过快速阅读文档,该库不是这样工作的。似乎没有办法以这种方式转换 HTML。
标签: javascript html docx