@turbodocx/html-to-docx 1.20.0 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -1
- package/dist/html-to-docx.browser.js +4 -4
- package/dist/html-to-docx.esm.js +2 -2
- package/dist/html-to-docx.umd.js +2 -2
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
[](https://typescript.org)
|
|
9
9
|
[](https://discord.gg/NYKwz4BcpX)
|
|
10
10
|
[](https://www.npmjs.com/package/@turbodocx/html-to-docx)
|
|
11
|
+
[](https://agentskills.io)
|
|
12
|
+
[](https://skills.sh/TurboDocx/quickstart)
|
|
11
13
|
[](https://twitter.com/TurboDocx)
|
|
12
14
|
[](https://www.turbodocx.com/use-cases/embedded-api?utm_source=github&utm_medium=repo&utm_campaign=open_source)
|
|
13
15
|
|
|
@@ -42,6 +44,28 @@ Based on the original work and assisted by the original contributors of [private
|
|
|
42
44
|
|
|
43
45
|
🛠️ **Developer Experience** - Full TypeScript support, comprehensive documentation, and extensive examples to get you up and running in minutes.
|
|
44
46
|
|
|
47
|
+
## Install via AI Agent Skill
|
|
48
|
+
|
|
49
|
+
Skip the boilerplate. If you use Claude Code, GitHub Copilot, Cursor, OpenCode, OpenAI Codex CLI, or Gemini CLI, you can install the `turbodocx-html-to-docx` [Agent Skill](https://agentskills.io) and have your AI agent install the package, detect your framework, and generate working integration code in one step:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npx skills add TurboDocx/quickstart
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Then in your editor, invoke the skill:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
/turbodocx-html-to-docx
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The skill will:
|
|
62
|
+
1. Install `@turbodocx/html-to-docx` and any required peer dependencies
|
|
63
|
+
2. Detect your project structure (Express, Next.js, Fastify, NestJS, plain Node.js, etc.)
|
|
64
|
+
3. Generate a helper module and a framework-appropriate route/handler that returns a `.docx` response
|
|
65
|
+
4. Add example usage that matches your existing code patterns
|
|
66
|
+
|
|
67
|
+
Source for the skill lives at [TurboDocx/quickstart](https://github.com/TurboDocx/quickstart).
|
|
68
|
+
|
|
45
69
|
## Installation
|
|
46
70
|
|
|
47
71
|
Use the npm to install the project.
|
|
@@ -413,7 +437,14 @@ full fledged examples can be found under `example/`
|
|
|
413
437
|
|
|
414
438
|
## Notes
|
|
415
439
|
|
|
416
|
-
|
|
440
|
+
Page breaks can be added using CSS `page-break-before: always` or `page-break-after` on any block element (`<p>`, `<h1>`–`<h6>`, `<div>`, etc.):
|
|
441
|
+
```html
|
|
442
|
+
<p style="page-break-before: always;">This paragraph starts on a new page</p>
|
|
443
|
+
<p style="page-break-after: always;">A page break follows this paragraph</p>
|
|
444
|
+
<div style="page-break-before: always;"><p>Content on new page</p></div>
|
|
445
|
+
```
|
|
446
|
+
`page-break-before` only triggers on the value `always`. `page-break-after` triggers on any value for backward compatibility.
|
|
447
|
+
The legacy `<div class="page-break"></div>` pattern is still supported for backward compatibility (contents inside are ignored).
|
|
417
448
|
|
|
418
449
|
|
|
419
450
|
CSS list-style-type for `<ol>` element are now supported. Just do something like this in the HTML:
|