According to their documentation, there is an event for when the photoeditorsdk get close.
the editor will emit a
close
event when the user clicks the close button.
However, there is no indication on how to properly close the editor. I tried to remove any items inside of div editor like this:
// Closing
imageEditor.editor.on('close', (result) => {
console.log('Closing.....');
// TODO: This is not working.
$("#" + imageEditor.editorId).empty();
});
The problem with this solution is that if I tried to load the editor again does not work.
What is the proper way to close PhotoEditorSDK ReactUI?
You should do the following: