Open NiyazMulla opened 5 years ago
You should be able to use a file stream to download the contents of the editor. I would first convert the editor state to an HTML string and then use the file stream to get that string to download into a file.
You have to use these 2 conversion packages:
Libraries draftjs-to-html
can be used to convert RawDraftContentState to html.
html-to-draftjs
provides the option to convert HTML generated by react-draft-wysiwyg back to draftJS ContentState which can be used to initialize the Editor.
https://jpuri.github.io/react-draft-wysiwyg/#/docs (scroll to the very bottom to see an example)
if i entered something in this editor how can i get the that text to upload in a local file