Ability to view HTML markup
mwvolo opened this issue · comments
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
You cannot view the HTML markup.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. GIFs and screenshots are very helpful too.
What is the expected behavior?
I'd like to be able to have a button that would allow me to view the HTML markup and edit it.
Which versions of Draftail + Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draftail or Draft.js?
This has never worked as far as I know.
Hey @mwharrison,
Unfortunately there is no such thing possible in this editor, since it doesn’t store its content as HTML. Having such a feature would also go the opposite way to the editor’s general direction – trying to enforce that end users can't alter the content in unforeseen ways.
It would technically be possible to write a toolbar extension that takes the editor’s content, converts it to HTML, allows you to edit that, then inserts whatever was entered back into the editor – but again that completely defeats the purpose of using this editor to start with.
If you need such a feature, you'll probably be better off using an editor like https://www.tinymce.com/ or https://ckeditor.com/.