plate icon indicating copy to clipboard operation
plate copied to clipboard

Cannot remove marks from mentions

Open maxaggedon opened this issue 1 year ago • 3 comments

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

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

maxaggedon avatar Feb 15 '24 10:02 maxaggedon

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

kumarajay0412 avatar Apr 17 '24 23:04 kumarajay0412

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

maxaggedon avatar Apr 18 '24 14:04 maxaggedon

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

kumarajay0412 avatar Apr 19 '24 07:04 kumarajay0412