-
SO essentially I have a method that I need called anytime the editor is changed in any way. Is there some native method for this? I need a detailed explanation. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
So a bit more description, I am making a website that is essentially saving off projects onto another platform. I need a way to ensure that when the grapes-editor is changed in any way, that the json for the editor is saved off to the main application so I can save it. I already have a method that updates the state variable in charge of the json, but I need it called whenever the editor is updated in any way. Does anyone have any ideas how I might go about this? |
Beta Was this translation helpful? Give feedback.
-
You can use editor.on('update', () => console.log('editor updated', editor.getProjectData())) |
Beta Was this translation helpful? Give feedback.
You can use
update
event