lexical
lexical copied to clipboard
Bug: pasting a table causes a large number of empty lines to be pasted
Lexical version: v0.17.1+dev
Steps To Reproduce
- Create a table
- Copy table
- Paste table
https://github.com/user-attachments/assets/45049ba0-7a1e-404f-8bb1-4fa199b97673
I would guess that this has to do with the implementation of $unwrapArtificialNodes
It looks like this has occured across the majority of previous lexical versions.
Does lexical not currently support the importing of copied html tables? (I'm guessing it's not possible to get the html structure when using copy+paste from a website).
It would be great to look into whether we can at least handle the copy+paste of other lexical tables.
It really depends on what you mean by support. Does lexical have code that imports tables from html? Yes. Does it work in every possible scenario? No. It's a complicated feature, relatively new, and still has some rough edges. Reporting issues that you've found is helpful, submitting PRs to fix them is even more helpful. I've given you a pointer to where I think the root cause of the bug is likely to be.
No worries, appreciate the additional context. I'll dive into this and see what I can come up with.
Hi @etrepum, I couldn't reproduce this bug, is it fixed?
Hi @etrepum, I couldn't reproduce this bug, is it fixed?
Still very much reproducible in lexical playground. Unfortunately I haven't had much time or luck in resolving it.
I can't reproduce this
You're right, looks like it's been indirectly fixed.
Thanks @etrepum