You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
events: { 'image.beforeUpload': async function (images, editor) { // Before image is uploaded const data = new FormData(); data.append("orsactive", "true"); data.append("file", images[0]); await api.postForm(/upload, data ).then(response => { console.log("editor => ", editor); editor.image.insert(getImageUrl(response), null, null, editor.image.get()); }).catch(err => { console.log(err); }); return false; }, },
in this console log, editor is always coming as null. how can I solve this?
The text was updated successfully, but these errors were encountered:
events: { 'image.beforeUpload': async function (images, editor) { // Before image is uploaded const data = new FormData(); data.append("orsactive", "true"); data.append("file", images[0]); await api.postForm(
/upload, data ).then(response => { console.log("editor => ", editor); editor.image.insert(getImageUrl(response), null, null, editor.image.get()); }).catch(err => { console.log(err); }); return false; }, },
in this console log, editor is always coming as null. how can I solve this?
The text was updated successfully, but these errors were encountered: