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: Google Docs checklist does not paste correctly #6022

Closed
potatowagon opened this issue May 4, 2024 · 0 comments · Fixed by #6191
Closed

Bug: Google Docs checklist does not paste correctly #6022

potatowagon opened this issue May 4, 2024 · 0 comments · Fixed by #6191
Assignees
Labels
contribution-week Issues that are good to be picked up for the contribution week copy+paste Relates to Lexical Copy/Paste good first issue Good for newcomers

Comments

@potatowagon
Copy link
Contributor

Lexical version:

Steps To Reproduce

  1. copy a checklist from google docs
  2. paste into lexical

the html copied to clipboard for checkbox is

<li dir="ltr" role="checkbox" aria-checked="false" style="list-style-type:none;font-size:11pt;font-family:'Optimistic Text',sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;" aria-level="1"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAA1ElEQVR4Ae3bMQ4BURSFYY2xBuwQ7BIkTGxFRj9Oo9RdkXn5TvL3L19u+2ZmZmZmZhVbpH26pFcaJ9IrndMudb/CWadHGiden1bll9MIzqd79SUd0thY20qga4NA50qgoUGgoRJo/NL/V/N+QIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEyFeEZyXQpUGgUyXQrkGgTSVQl/qGcG5pnkq3Sn0jOMv0k3Vpm05pmNjfsGPalFyOmZmZmdkbSS9cKbtzhxMAAAAASUVORK5CYII=" width="17.599999999999998px" height="17.599999999999998px" alt="unchecked" aria-roledescription="checkbox" style="margin-right:3px;" />

could add an import conversion map on listnode to handle this case on the condition <li role="checkbox" aria-checked="false"> or <img alt="unchecked" aria-roledescription="checkbox">

The current behavior

  • the check box gets pasted as a block image
Screenshot 2024-05-04 at 2 51 19 PM Screenshot 2024-05-04 at 2 52 12 PM

The expected behavior

converts to a lexical checklist

@potatowagon potatowagon self-assigned this May 4, 2024
@StyleT StyleT added good first issue Good for newcomers contribution-week Issues that are good to be picked up for the contribution week labels May 6, 2024
@ivailop7 ivailop7 added the copy+paste Relates to Lexical Copy/Paste label May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution-week Issues that are good to be picked up for the contribution week copy+paste Relates to Lexical Copy/Paste good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants