udecode / plate

A rich-text editor powered by AI
https://platejs.org
Other
12k stars 734 forks source link

Delete forward on empty line before code block unwraps code line #2686

Closed 12joan closed 1 year ago

12joan commented 1 year ago

Description

When deleting forward from an empty paragraph immediately before a code block, the first line of the code block is unwrapped. This makes it impossible to remove such a paragraph if the code block should be at the start of the document.

Steps to Reproduce

  1. Go to platejs.org
  2. Create an empty paragraph followed by a code block containing at least two lines
  3. Place the cursor at the empty paragraph
  4. Delete forward

https://github.com/udecode/plate/assets/4272090/2ac5cc48-95ff-4c02-bf82-e2764a5ccc37

Expected Behavior

This is consistent with lists:

https://github.com/udecode/plate/assets/4272090/d9e1d265-ed7c-4fdf-8e72-483d560dccf6

Bounty

Click here to add a bounty via Algora.

Funding

Fund with Polar

12joan commented 1 year ago

/bounty $100

algora-pbc[bot] commented 1 year ago

💎 $100 bounty created by 12joan 🙋 If you start working on this, comment /attempt #2686 to notify everyone 👉 To claim this bounty, submit a pull request that includes the text /claim #2686 somewhere in its body 📝 Before proceeding, please make sure you can receive payouts in your country 💵 Payment arrives in your account 2-5 days after the bounty is rewarded 💯 You keep 100% of the bounty award 🙏 Thank you for contributing to udecode/plate!

Attempt Started (GMT+0) Solution
🟢 @Hitesh-sisara Oct 7, 2023, 7:02:59 PM WIP
🟢 @Vishal-Sikka Oct 7, 2023, 7:10:36 PM WIP
🟢 @prateekkalra Oct 7, 2023, 7:13:30 PM WIP
🟢 @archie9211 Oct 8, 2023, 1:11:16 AM #2687
Hitesh-Sisara commented 1 year ago

/attempt #2686

Options
Vishal-Sikka commented 1 year ago

/attempt #2686

Options
algora-pbc[bot] commented 1 year ago

Note: The user @Hitesh-sisara is already attempting to complete issue #2686 and claim the bounty. If you attempt to complete the same issue, there is a chance that @Hitesh-sisara will complete the issue first, and be awarded the bounty. We recommend discussing with @Hitesh-sisara and potentially collaborating on the same solution versus creating an alternate solution.

prateekkalra commented 1 year ago

/attempt #2686

Options
archie9211 commented 1 year ago

/attempt https://github.com/udecode/plate/issues/2686

Options
algora-pbc[bot] commented 1 year ago

💡 @archie9211 submitted a pull request that claims the bounty. You can visit your org dashboard to reward. 👉 @archie9211: To receive payouts, sign up on Algora, link your Github account and connect with Stripe/Alipay on your dashboard.

algora-pbc[bot] commented 1 year ago

🎉🎈 @archie9211 has been awarded $100! 🎈🎊