-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Bug: Copy Pase of List elements b/w Playground & any Custom Instance is producing extra lines #3740
Comments
@trueadm @thegreatercurve As I mentioned should be easy to reproduce for you from the playground website and the lexical homepage. Please give some direction, whenever free. |
@gaurav21r I think the issue is more to do with the list logic, which we're looking to refactor in the next couple of months. It's a long standing issue with how we are nesting lists #2951 |
@thegreatercurve Thanks for responding! Yes it does seem to be the long term fix for this issue. But can you suggest a temp workaround till then? What I find intriguing is that if I copy the list in the playground and paste it (even in a separate playground instance) its working, similarly if I copy it from the CodeSandbox on the home page and paste it there only its working. Its only when its being transferred across each other that this bug happens. Maybe there is a Plugin in the Playground that's contributing to this? |
This behavior is most likely because the bug you're seeing is with HTML Serialization. Lexical uses native JSON transfer format for most cases between Lexical instances, so the bug occurs when the paste content is HTML, but not when it's JSON. |
This is another indication that the HTML (De)Serialization is the problem. |
Here ya go: |
@acywatson Thanks a ton! Let me Pull master and confirm so we can close this! |
Thanks a lot @acywatson 🍺 ! |
hey @thegreatercurve or anyone else on the team. This information is critical to me. Could you tell me what the change will consist of please? |
Most of the context is in this thread that you’re already involved in. There’s not much else. @thegreatercurve will own this |
Since this bug pertains to a base level feature (Lists & Clipboard) I'm flagging as URGENT
Lexical version: 0.6.0 to latest
Steps To Reproduce
Link to code example: Codesandbox link of Rich Text Editor from the website itself: https://codesandbox.io/s/lexical-rich-text-example-5tncvy?from-embed
The current behavior
There is an extra
\n
being added to every list item that has a sub list.The expected behavior
The playground editor and all other editors should behave consistently.
Probable cause.
I couldn't understand the code much but I think this line may be the offender.
lexical/packages/lexical-clipboard/src/clipboard.ts
Line 126 in 68c64e9
The comment seems to suggest something to the issue.
The text was updated successfully, but these errors were encountered: