react-native-zss-rich-text-editor icon indicating copy to clipboard operation
react-native-zss-rich-text-editor copied to clipboard

Cannot delete image in some cases

Open LowCarbonGuy opened this issue 7 years ago • 3 comments

Hi all,

I'm running into an issue where I cannot delete an image that I just inserted. I suspect I'm missing something obvious, given that no one else has mentioned this issue yet. Any pointer will be greatly appreciated, thanks!

Repro steps:

  1. Insert an image.

  2. Type some letters, e.g. Abc. After this step, the argument str in RichTextEditor.onBridgeMessage will be:

{
  "type": "CONTENT_CHANGE",
  "data": {
    "content": "<br><img src=\"http://example.com/image.png\">Abc",
    "contentText": "Abc"
  }
}
  1. Move the caret to the front of the line Abc.

  2. Click backspace.

Expected behavior: The image should get deleted.

Actual behavior: Both the image and the words remain. After step 4, the argument str in RichTextEditor.onBridgeMessage will be:

{
  "type": "CONTENT_CHANGE",
  "data": {
    "content": "<br><img src=\"http://example.com/image.png\"><span style=\"font-size: 1em;\">A</span><span style=\"font-size: 1em;\">b</span><span style=\"font-size: 1em;\">c</span><br>",
    "contentText": "Abc"
  }
}

LowCarbonGuy avatar May 25 '17 07:05 LowCarbonGuy

hello?

zpfblockchains avatar Nov 15 '18 03:11 zpfblockchains

can't delete image which before text too. @LowCarbonGuy how do you solve this problem final?cant you give me some mention. thanks

Prozhou avatar Dec 08 '18 14:12 Prozhou

@Prozhou Unfortunately I've never found a solution for this problem.

LowCarbonGuy avatar Dec 09 '18 00:12 LowCarbonGuy