Insert a picture at the top of draft.js, position the cursor on the previous line, press delete, and report an error

I insert a picture at the top of the editor, there are two blank lines up and down, position the mouse over the line of the picture, press the delete key, and the picture disappears, but when I submit the content, I see that the picture of the child has been submitted, that is to say, the picture has not actually been deleted.

when I click in again to edit, I report an error Unknown DraftEntity key: null.

clipboard.png

delete

clipboard.png

""



clipboard.png

Jul.13,2021
I have solved the problem of

reporting an error, that is, there must be a package on the outer layer of your html. According to the rules of react, when you delete it, it becomes is an inline element and should be wrapped in a block-level element, such as

< / div >;


how to solve the problem? have you solved the problem of finding a solution


brother? I also met how to deal with A?

Menu