Skip to content
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 paste list from MacOS Pages app throw an error #583

Closed
2 tasks done
dmowski opened this issue Sep 11, 2024 · 4 comments
Closed
2 tasks done

[BUG] Copy paste list from MacOS Pages app throw an error #583

dmowski opened this issue Sep 11, 2024 · 4 comments
Labels
bug Something isn't working released

Comments

@dmowski
Copy link

dmowski commented Sep 11, 2024

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • I have read the documentation and cannot find an answer.

Describe the bug
When copy pasting List elements from docx file on MacOs, changes are not applied.

To Reproduce

  1. Go to mdxeditor.dev demo
  2. Open provided document
    listCopyPaste.docx
image
  1. Copy/Paste content into Editor
  2. Open browser console
  3. See error:
image

TypeError: Cannot read properties of undefined (reading 'children')

Expected behavior
No error in console, on change event triggered

Desktop:

  • OS: MacOS
  • Browser: Chrome

Additional context
I found, that errors happened on module
src/exportMarkdownFromLexical.ts:100
Function: isParent

Additionally I checked that mdastParent! is undefined
image

src/exportMarkdownFromLexical.ts:100

I've tried to update lexical libs to 0.17.1 - doesn't help

If someone would suggest what to do to fix it, or how to better research it I will be thankful.
For now, I am new at that code base, and it's little difficult to fix it fast for me

@dmowski dmowski added the bug Something isn't working label Sep 11, 2024
@petyosi
Copy link
Contributor

petyosi commented Sep 11, 2024

@dmowski this is this issue: #178. Nested lists are very painful. I want to fix this, but it's not very simple, especially with copy paste. The AST is the culprit.

@petyosi
Copy link
Contributor

petyosi commented Sep 11, 2024

@dmowski forgot to mention - thank you for the sponsorship. I will see if I can at least prevent the error, even if this means losing the indentation, which IMO is far more acceptable.

@dmowski
Copy link
Author

dmowski commented Sep 11, 2024

@dmowski forgot to mention - thank you for the sponsorship. I will see if I can at least prevent the error, even if this means losing the indentation, which IMO is far more acceptable.

Nice, Thanks. yes, it will be nice to prevent losing data, even if formatting will be broken (that's ok).

In my case, end user see editor on page with auto saving functionality, and they may put something to editor and close the tab. With error, onChange event doesn't trigger and nothing to save

Copy link

🎉 This issue has been resolved in version 3.11.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
2 participants