Closed Shubhankerism closed 3 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
lexical | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 24, 2024 5:14pm |
lexical-playground | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 24, 2024 5:14pm |
Thank you, we can merge this, but I'd be inclined to roll it back as soon as https://github.com/facebook/lexical/pull/5857 is ready as it fixes the same issue in a more generic manner cc @potatowagon
Thanks Gerard! Happy to revert once the larger one lands. Do we have an ETA on the generic solution? If it's a week, we can wait it out.
This PR fixes pasting tables that have the copied html in such format:
Pasting this results in the following node structure:
which causes the editor to freeze and eventually crash on enter key press, as the text node is not wrapped in a paragraph node. This issue is similar to the one described here and was fixed for the case when pasting empty cells.
This PR addresses the case when on paste the children of the
TableCell
node are not within a block element node.Another case to reproduce this issue is when we copy something with such html:
This results in a link node inside a tablecell node which again crashes on enter key press.
Also, this PR fixes the issue with alignment of text inside the cell as well, as this formatting can now be applied on the wrapping block element node. So, copying from google sheets will now have the correct alignment.
Before
After