Closed zoinho3d closed 7 years ago
Hi, I was doing a prototyping of a tool, and I actually used part of your code mixed with demo to make the uploader.
I will post the whole file, may be it will help you somehow. Just remember that it's just that - a quick prototype to test the backend api. editor.js.txt
Hello. First of all, congratulations on the excellent work.
I'm trying to enable image upload and I've already followed the tutorial steps (http://getcontenttools.com/tutorials/handling-image-uploads) but I was not successful.
I researched and got to this code, which sends the image to the folder specified in PHP, but the dialog box freezes 100% and does not return the INSERT button, leaving only the CANCEL button as an option.
Could someone please help me see where I'm going wrong? This is my code.
window.addEventListener('load', function() { var editor; });
editor = ContentTools.EditorApp.get(); editor.init('*[data-editable]', 'data-name');
editor.addEventListener('saved', function (ev) { var name, payload, regions, xhr;
});
editor.addEventListener('start', function (ev) { var _this = this;
});
editor.addEventListener('stop', function (ev) { // Stop the autosave clearInterval(this.autoSaveTimer); });
function imageUploader(dialog) { var image, xhr, xhrComplete, xhrProgress;
} ContentTools.IMAGE_UPLOADER = imageUploader;