[Feature] Pass store manager's response to editor's store callback #876
Closed
Description
Hi @artf,
We have a need to get a response of the store manager when calling editor.store() method with a callback (we return generated template id in this case from the server). I'm pretty sure you have it implemented for editor.load() method.
I think the change is pretty simple in /src/editor/model/Editor.js
/**
* Store data to the current storage
* @param {Function} clb Callback function
* @return {Object} Stored data
* @private
*/
store(clb) {
...
sm.store(store, (res) => {
clb && clb(res);
this.set('changesCount', 0);
this.trigger('storage:store', store);
});
...
},
Let me know if you want me to do a pull request.
Thank you.