Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Table Improvements] Fill table gaps #3272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
juliaroldi wants to merge 1 commit into master
base: master
Choose a base branch
Loading
from u/juliaroldi/complete-table

Conversation

@juliaroldi
Copy link
Contributor

@juliaroldi juliaroldi commented Jan 26, 2026
edited
Loading

When pasting a complex table, with different cell number in each row, fill the gaps with spanned cells, making the table model uniform.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements automatic gap-filling for tables with irregular row lengths, ensuring all rows have the same number of cells by adding spanned cells where needed. This is particularly useful when pasting complex tables from external sources that may have inconsistent cell counts per row.

Changes:

  • Added logic to track the maximum column count across all table rows
  • Implemented gap-filling that extends short rows with spanLeft cells matching the properties of the last cell in each row
  • Added comprehensive test coverage for various gap-filling scenarios including simple short rows, header cells in short rows, and tables with colspan

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/roosterjs-content-model-dom/lib/domToModel/processors/tableProcessor.ts Implements the core gap-filling logic by tracking maxColumns and filling short rows with spanLeft cells that inherit properties from the last cell
packages/roosterjs-content-model-dom/test/domToModel/processors/tableProcessorTest.ts Adds new test cases for gap-filling scenarios and updates existing tests to reflect the uniform table structure created by gap-filling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Reviewers

Copilot code review Copilot Copilot left review comments

@JiuqingSong JiuqingSong Awaiting requested review from JiuqingSong

@flyingbee2012 flyingbee2012 Awaiting requested review from flyingbee2012

@BryanValverdeU BryanValverdeU Awaiting requested review from BryanValverdeU

@ianeli1 ianeli1 Awaiting requested review from ianeli1

@vinguyen12 vinguyen12 Awaiting requested review from vinguyen12

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /