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

[lexical] Bug Fix: more accurate line break pasting #6395

Merged
merged 5 commits into from
Jul 13, 2024
Merged

Conversation

potatowagon
Copy link
Contributor

@potatowagon potatowagon commented Jul 12, 2024

Improve br pasting

  • ignore only child br in block nodes and not just <p>. fixes extra br in <li> paste
  • ignore last br in block node, since thats what html is doing (src)

Test plan

Screenshot 2024-07-12 at 3 04 21 PM

Before

Screenshot 2024-07-12 at 3 04 32 PM

After

Screenshot 2024-07-12 at 3 06 30 PM


Screenshot 2024-07-12 at 3 27 27 PM

before

Screenshot 2024-07-12 at 3 27 45 PM

after

Screenshot 2024-07-12 at 3 27 39 PM

Copy link

vercel bot commented Jul 12, 2024

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 Jul 12, 2024 7:32am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2024 7:32am

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 12, 2024
Copy link

github-actions bot commented Jul 12, 2024

size-limit report 📦

Path Size
lexical - cjs 28.48 KB (0%)
lexical - esm 28.29 KB (0%)
@lexical/rich-text - cjs 36.93 KB (0%)
@lexical/rich-text - esm 28.16 KB (0%)
@lexical/plain-text - cjs 35.6 KB (0%)
@lexical/plain-text - esm 25.34 KB (0%)
@lexical/react - cjs 38.8 KB (0%)
@lexical/react - esm 29.31 KB (0%)

@potatowagon potatowagon marked this pull request as draft July 12, 2024 07:15
@potatowagon potatowagon changed the title Block br [lexical] Bug Fix: more accurate line break pasting Jul 12, 2024
@potatowagon potatowagon marked this pull request as ready for review July 12, 2024 07:33
@potatowagon potatowagon added this pull request to the merge queue Jul 13, 2024
Merged via the queue into main with commit e6099f3 Jul 13, 2024
42 checks passed
2wheeh pushed a commit to 2wheeh/lexical that referenced this pull request Jul 17, 2024
@potatowagon potatowagon deleted the block-br branch July 26, 2024 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants