From 182be09a6789b7e8f44e98fab12f4be5281a0255 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Wed, 28 Oct 2026 19:29:26 +0000 Subject: [PATCH] docs: say a table goes next to paragraphs, never in a paragraph's children #2711's HTML converter put each table in `new Paragraph({ children: [table] })`, which writes a w:tbl inside a w:p that Word can't open. TypeScript has rejected it since 9.13.0 (#3790), but plain JavaScript still writes it, and the docs never said where a table can go. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01X5zGDL3sgGVBMXPfny376c --- docs/usage/tables.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/usage/tables.md b/docs/usage/tables.md index 1a6e15e7ec9..8a7c3033b44 100644 --- a/docs/usage/tables.md +++ b/docs/usage/tables.md @@ -7,6 +7,7 @@ - `Tables` contain a list of `Rows` - `Rows` contain a list of `TableCells` - `TableCells` contain a list of `Paragraphs` and/or `Tables`. You can add `Tables` as tables can be nested inside each other +- A `Table` goes next to `Paragraphs`, in a section's, header's, footer's, cell's or text box's `children`, never in a paragraph's. Word can't open a document with a table inside a paragraph, and since 9.13.0 TypeScript reports it: `Type 'Table' is not assignable to type 'ParagraphChild'` Create a simple table, then add the table in the `section`: