Support question. +1
How can I get the json and html in the editor not when onSave but at anytime?
I need to get current state of my editor to know if there is changes . Could you add a possibility to get json and html - probably some function getState(jsonFile, htmlFile) ???
Please sign in to leave a comment.
Good question. I tried to find a solution, but without success.
I'm joining to this question.
Such a function does not exist because parsing the JSON to output the HTML is a time consuming task that you should not execute continuously. It will lead to a bad user experience (when you execute onSave, the user expects a minor delay while the message is saved, so there is no impact on the UX there).
What you can do instead is to:
- Leverage autosave: https://support.beefree.io/hc/en-us/articles/360004495552-Configuring-the-editor
- Compare the JSON files that are saved by your application
We hope this helps!