Close
Efficiently manage the Picsart Photo and Video Editor SDK sessions by using the close method to reset the editor and free up resources.
Close
It is recommended to use the Picsart Photo and Video Editor SDK's close method to reset the editor's state and free up memory.
PicsartInstance.close();
By providing a callback function, you can handle actions when the editor is closed.
PicsartInstance.onClose(() => {
console.log(“SDK has been closed”)
})
Important
Closing the editor may be necessary when users switch to a different flow, click outside of the editor popup, or encounter similar scenarios. It is safe to call the close method even if the editor is already closed.
Clear canvas
If you prefer not to close the editor window after exporting an image and simply want to clear the canvas, you can use the clear method.
PicsartInstance.clear();
Alternative
Alternatively, users can also close the editor from within the editor interface itself. The editor includes a Cancel button, which users can click to close or complete the editing process.
Updated 8 days ago