Hi. I'm currently working with DocumentEditor. I have made a drag and drop functionality for images and strings. I am encountering an issue as per the title says. I find it weird since it only happens when I use my drop event. Certain images do not cause this issue. Regular image uploading using the toolbar works as intended.
Code used is show below:
let path = e.dataTransfer.files[0];
let reader = new FileReader();
reader.onload = function (frEvent) {
let base64String = frEvent.target.result;
let image = document.createElement('img');
image.addEventListener('load', function () {
documenteditor.documentEditor.editor.insertImageAsync(base64String, this.width, this.height);
})
image.src = base64String;
};
reader.readAsDataURL(path);