Quick question: If you only want to display a post made in Draft.js, do you pass it through to those draft-js to HTML converters like draft-js-export-html? Or do you just toggle the readOnly tag?
I realized that these converters does not any non default styles that I put, Entities and Atomic Blocks that put. I have to write that options in the module, which makes it redundant.
I think the quick answer is "Yes".
That is, you have to decide which of the two options which is best for your case. Both will "work," assuming all you need is to get the composed text displayed in a browser.
@flarnie I have the same problem, could you help me?
@QuietWind the two options are what's described above – either use the <Editor> with readOnly turned on, or use one of the many third-party converters available.
Lots of them are listed here: https://github.com/nikgraf/awesome-draft-js#common-utilities
@thibaudcolas thx your answers!
Most helpful comment
@QuietWind the two options are what's described above – either use the
<Editor>withreadOnlyturned on, or use one of the many third-party converters available.Lots of them are listed here: https://github.com/nikgraf/awesome-draft-js#common-utilities