-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Support pasting table with lists content #46512
Conversation
… is converted to simple content which is formatted to look like a list using whitespace.
@danielbachhuber , @ellatrix. I recreated this PR from the draft #46254. Can you give it a review? I can beef up the test suite but for now I would like to get some feedback and make sure this PR will be accepted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet! This seems to work pretty well to me from a product perspective. I'll defer to others on the codes.
For Example 4 (below), do we want to alternate between letters and numbers?
Example 1
Google Docs
Paste Into Gutenberg
Example 2
Google Docs
Gutenberg Paste
Example 3
Google Docs
Paste Into Gutenberg
Example 4
Google Docs
Paste Into Gutenberg
Example 5
Google Docs
Paste Into Gutenberg
@mpkelly Can you rebase trunk and make sure all of the tests pass? |
Thanks for the ping, @danielbachhuber. There are some test failures, but I can't see why. The |
… is converted to simple content which is formatted to look like a list using whitespace.
…nto add/support-for-pasting-lists
… the fixture test; add missing attribute to the out-file that got lost somewhere in the merging/rebasing.
… the fixture test; add missing attribute to the out-file that got lost somewhere in the merging/rebasing.
…nto add/support-for-pasting-lists
Related to #45774
What?
It's based on requirement 2 from #45774. If you paste a table which includes
ul
orol
elements, these elements will be converted to simple content and formatted with whitespace to try and keep the original list structure. This avoids having to support complex nested content in tables.Why?
Increase parity between Gutenberg and other editors.
How?
Allow the list schema to be embedded into
td
andth
. Add atransform
function fortables
that can convert these tables into simple content.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Source table (Google docs)
Gutenberg editor after pasting the table above
How the
td
which contained the list looks in the DOM when previewing