You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pasting content from HTML emails has already greatly improved, but sometimes it still results in a table block if the email is structured with tables and part of it was copied. I wonder if we can't do a better job here, maybe detect if the table only has one cell, or check if the cell has any block level HTML content.
🐞 When copying and pasting the table content, it gets to Gutenberg in a series of unformatted tables.
Note that the original code used by the email, tested by me, is practically the same as the one proposed here.
Actual Results
✅ Table blocks still appearing.
Additional Notes
Pasting the code reported here results in a preformatted block though, so it’s not happening the same behaviour any more (check below)
ATM, I cannot really judge if this is the expected behaviour. I can't see any scenario where the email could hold the appearance a little.
Supplemental Artifacts
Original Email Aspect
After Pasting
Pasting code in a comment generates a preformatted block:
Activity
mtias commentedon Oct 7, 2018
@iseulde do you think there's anything we can do better here in the short term or should we close?
designsimply commentedon Jan 8, 2019
Tested and confirmed that copying and pasting content from an HTML email structured with tables results in a table block.
Example original email: https://pastebin.com/tanQhPjZ
Example email:
Example result of selecting everything in the email and pasting into Gutenberg:
karmatosed commentedon Apr 30, 2025
Adding a needs testing label to be sure this is still valid.
SirLouen commentedon Jul 6, 2025
Reproduction Report
Description
✅ This report can still be reproduced
Environment
Instructions
Note that the original code used by the email, tested by me, is practically the same as the one proposed here.
Actual Results
Additional Notes
Supplemental Artifacts
Original Email Aspect
After Pasting
Pasting code in a comment generates a
preformattedblock:SirLouen commentedon Jul 16, 2025
@karmatosed confirmed that it's still valid,
Needs Testinglabel can be switched.