Open ggrossetie opened 6 years ago
Same problem here
I'm not sure if this is related but I have an issue where the Firefox 58 browser returns null from convertFromHTML() whereas Chrome/Chromium returns the desired contentBlocks and entityMap data.
const sampleMarkup = '<b>Text</b>';
const blocksFromHTML = convertFromHTML(sampleMarkup); // returns null in Firefox but not in Chrome/Chromium
It's actually not. The object is hiding the actual entity collection and only making it accessible through the accessor functions. Tools that then rely on the standard JSON access patterns such as testing frameworks or Redux, then display an empty object, because they cannot access the internals.
Do you want to request a feature or report a bug?
bug (or an undocumented feature ?)
What is the current behavior?
editorState.getCurrentContent()
contains an emptyentityMap
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Here's a Jest test extracted from our tests suite:
What is the expected behavior?
editorState.getCurrentContent()
should contain the complete state includingentityMap
Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
It was working in 0.10.4 but it does not work anymore in 0.10.5. I've read the changelog but, as far as I understand, nothing should have changed ? 😉