javascript - How do I get docx.js children method to work?
问题描述
I would like to create a web app to generate .docx
files.
So I found docx.js
. I got a basic file to generate. With the use of constants, it's not much of a problem.
However, when using the children method, it only generates an empty .docx.
doc.addSection({
children: [
new Paragraph({
children: [new TextRun("Hello World")],
}),
],
});
https://codepen.io/DVGeoffrey/pen/ExxgEJv here is the pen.
What am I doing wrong here? How do I get this to work properly? Thank you :-)
解决方案
推荐阅读
- python - 我可以使用函数参数在 Python 中重新定义变量吗?
- wav - 如何将 .opus 文件转换为 .wav 文件
- android - 运行时的xml布局预览和activity不一致
- firebase - 用户使用 FirebaseAuth 在 Flutter 中注册 Android 应用后导航到页面
- macos - 我在 SwiftUI 中的 macOS 应用程序,计时器在窗口(NSWindow)关闭后从不停止
- registry - Windows 2020 年 5 月 10 日更新中 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FeatureManagement\Overrides\4\ Hive 的用途
- javascript - 如何使用 RequireJs 删除我的模块
- reactjs - TypeError:无法读取未定义 React 的属性“值”,Ant 选择
- python - 我有一个二维数组列表。如何将列表转换为 3 维 numpy 数组?
- batch-file - 使用批处理脚本创建一个文本文件,然后在同一个批处理实例中打开该文本文件