Skip to content

DEV-26977 Keep the margins of each row spanned by a vertically merged cell - #86

Open
ins426 wants to merge 1 commit into
developfrom
DEV-26977
Open

ins426 wants to merge 1 commit into
developfrom
DEV-26977

Conversation

@ins426

@ins426 ins426 commented Sep 14, 2026

Copy link
Copy Markdown

In OOXML a vertically merged cell has one w:tc per row, each with its own w:tcMar and Word uses those margins for the row height. docxml collapsed the merge into one cell with rowSpan and, when writing it back, repeated the margins of the first row in every spanned row, so rows could come out taller than in the source document.

  • Cell.fromNode() reads the w:tcMar of each spanned row into the new CellProps.spannedRowMargins (null when a row has no margins of its own).
  • Cell.toRepeatingNode() writes those margins per row, and falls back to margin when the list is not set, as before.
  • Export the CellMargin type add tests and the table-spanned-row-margins example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants