Fix PowerPoint paste bug with list markers in table cells#3398
Open
BryanValverdeU wants to merge 4 commits into
Open
Fix PowerPoint paste bug with list markers in table cells#3398BryanValverdeU wants to merge 4 commits into
BryanValverdeU wants to merge 4 commits into
Conversation
Skip list-item processing for table elements and clear the list marker font size so it does not overflow the table cell. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Only remove the list marker font size when the list is inside a table cell, and add unit tests covering table detection and marker font size. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
BryanValverdeU
requested review from
JiuqingSong,
Copilot,
flyingbee2012,
ianeli1,
juliaroldi and
vinguyen12
July 13, 2026 21:17
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens the PowerPoint paste pre-processing logic so that PowerPoint-generated “bullet marker” spans inside tables don’t cause table elements to be mis-identified as list items, and it adjusts list marker formatting inside table cells to avoid oversized markers overflowing cell bounds.
Changes:
- Avoid list-item detection on table-related elements (
TABLE,THEAD,TBODY,TFOOT,TR,TD,TH) by skipping the bullet-marker query on those tags. - When a detected list item is inside a table cell, clear
listItem.formatHolder.format.fontSizeto prevent marker sizing issues. - Add focused unit tests covering list conversion, font-size clearing behavior, and ensuring tables remain tables when they contain bullet markers.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/roosterjs-content-model-plugins/lib/paste/PowerPoint/processPastedContentFromPowerPoint.ts | Skips bullet-marker detection for table elements and clears list marker font size when inside td/th. |
| packages/roosterjs-content-model-plugins/test/paste/powerPoint/processPastedContentFromPowerPointTest.ts | Adds tests validating list handling for PowerPoint bullets inside/outside tables and preventing table-to-list mis-conversion. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
juliaroldi
approved these changes
Jul 14, 2026
JiuqingSong
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Scoped to the PowerPoint paste processor only.
Before and after here:
Bug 443376: Copy_paste table from powerpoint looses all formatting when pasted in Monarch
How to test