react-native-zss-rich-text-editor
react-native-zss-rich-text-editor copied to clipboard
Cannot delete image in some cases
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:
-
Insert an image.
-
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"
}
}
-
Move the caret to the front of the line Abc.
-
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"
}
}
hello?
can't delete image which before text too. @LowCarbonGuy how do you solve this problem final?cant you give me some mention. thanks
@Prozhou Unfortunately I've never found a solution for this problem.