@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 CHANGED
@@ -8,6 +8,8 @@
8
8
  [![Type Script](https://shields.io/badge/TypeScript-3178C6?logo=TypeScript&logoColor=FFF&style=flat-square)](https://typescript.org)
9
9
  [![Discord](https://img.shields.io/badge/Discord-Join%20Us-7289DA?logo=discord)](https://discord.gg/NYKwz4BcpX)
10
10
  [![npm](https://img.shields.io/npm/dm/@turbodocx/html-to-docx)](https://www.npmjs.com/package/@turbodocx/html-to-docx)
11
+ [![Agent Skill](https://img.shields.io/badge/agent_skill-agentskills.io-7C3AED)](https://agentskills.io)
12
+ [![skills.sh](https://skills.sh/b/TurboDocx/quickstart)](https://skills.sh/TurboDocx/quickstart)
11
13
  [![X](https://img.shields.io/badge/X-@TurboDocx-1DA1F2?logo=x&logoColor=white)](https://twitter.com/TurboDocx)
12
14
  [![Embed TurboDocx in Your App in Minutes](https://img.shields.io/badge/Embed%20TurboDocx%20in%20Your%20App%20in%20Minutes-8A2BE2)](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
- Currently page break can be implemented by having div with classname "page-break" or style "page-break-after" despite the values of the "page-break-after", and contents inside the div element will be ignored. `<div class="page-break" style="page-break-after: always;"></div>`
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: