jpuri / html-to-draftjs

MIT License
161 stars 104 forks source link

Error: Unknown DraftEntity key. #31

Open zeg-io opened 7 years ago

zeg-io commented 7 years ago

I use shift+enter inside a code block to add a line... it works fine.

Then I go to the beginning of the code block and do the same thing and BOOM, it blows up.

GitHub doesn't let me upload an mp4, so I zipped and attached a zipped mp4 of the sequence of events.

Thoughts on how to fix?

2017-09-21_12-54-50.mp4.zip

jpuri commented 7 years ago

Hey @zeg-io : As you are converting content from html to editor state you need to copy entity data also. Refer this: https://github.com/jpuri/react-draft-wysiwyg/blob/paste_improvements/src/utils/handlePaste.js#L24

Plz let me know if you still face issue.