striven-editor

Maintained and contributed to an open source WYSIWYG editor as an internship project that made it to production and was adopted by the company I was working at.
git clone https://unitehenry.com/git/striven-editor.git
Log | Files | Refs | README | LICENSE

commit 99f755b3fac463bdd6caa02d66b5f442bab03ebc
parent 26ae52d83779113d7e96390b98f369c70c54b069
Author: unitehenry <unitehenry@gmail.com>
Date:   Thu, 24 Oct 2019 08:25:57 -0400

attach files check

Diffstat:
Msrc/striveneditor.js | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -853,6 +853,7 @@ export default class StrivenEditor { }, false); this.body.ondragenter = e => { + console.log(e.dataTransfer.files) if (!this.body.querySelector('.se-file-drop-dropzone')) { const dropzone = document.createElement("div"); const dropzoneTextEl = document.createElement("p"); @@ -880,7 +881,7 @@ export default class StrivenEditor { e.preventDefault(); - const file = (e.dataTransfer.files && e.dataTransfer.files[0]); + const file = (e.dataTransfer.files.length && e.dataTransfer.files[0]); this.attachFile(file); }