Open Prottoy2938 opened 4 years ago
I am having the exact same issue, toHtml() returns nothing.
I have the same problem
I got the same problem too, but I finally solved it by npm uninstall draft-js
as I saw someone saying that this problem was due to draft-js version. After "npm uninstall", you may need to npm install braft-editor --save
back again, just execute it and things may be all right. Hope this will help.
I also encountered the same problem. My solution is to reduce the version of braft-editor
and lock the version, that is, change braft-editor
to the original ^2.3.9
in package.json
Change to 2.3.8
.
Analyze the reasons:
The braft-editor
depends on the updated version of draft-js
in the package. If the version of draft-js
is reduced, the version of the dependency package draft-js
will also be reduced (to 0.10.5
), so that it is back to the normal usability before. The version is locked so that the latest minor version dependency package is not actually downloaded.
这么好的一个编辑器,因为无法toHtml()就这样停摆了?
editorState.toHtml()
returns emptymy code:
Note that, I'm using:
"braft-editor": "^2.3.9"
and"draft-js": "^0.11.7"
What to do?