udecode / plate

The rich-text editor for React.
https://platejs.org
Other
9.42k stars 614 forks source link

Cannot remove marks from mentions #2951

Open maxaggedon opened 5 months ago

maxaggedon commented 5 months ago

Description

Mentions are markable, but the only way to revert the mark is to remove the whole mention and to create it again or to use history (undo).

Steps to Reproduce

  1. Go to (https://platejs.org/docs/mention)
  2. Select all the text in the example
  3. Make it bold (or italic or underline)
  4. Remove the mark you just added (with shortcut or button, not undo)

Expected Behavior

Mark should be removed

Funding

Fund with Polar

kumarajay0412 commented 3 months ago

i am not able to reproduce this bug can you help me by adding the video of bug

maxaggedon commented 3 months ago

It seems its not happening always, but I managed to reproduce on the playground by changing the selection

https://github.com/udecode/plate/assets/17004545/291fa62e-6952-4992-8f83-494aece678ad

kumarajay0412 commented 3 months ago

using removeEditorMark instead of removeMark solved the issue for me removeMark was not working for me on mentions