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 ce8d6666ed3e68b9f975c6f3eb352b47b9a49de1
parent 99f755b3fac463bdd6caa02d66b5f442bab03ebc
Author: unitehenry <unitehenry@gmail.com>
Date:   Thu, 24 Oct 2019 08:28:00 -0400

editor class name

Diffstat:
Msrc/striveneditor.css | 2+-
Msrc/striveneditor.js | 6+++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/striveneditor.css b/src/striveneditor.css @@ -9,7 +9,7 @@ /** Editor **/ -.striven-editor.editor { +.striven-editor { border: 1px solid #ddd; background-color: #fff; display: flex; diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -121,7 +121,7 @@ export default class StrivenEditor { this.metaDataSection = this.initMetaDataSection(); this.filesSection = this.options.fileUpload && this.initFilesSection(); - this.editor.classList.add("editor", "striven-editor") + this.editor.classList.add("striven-editor"); // Initialze with the value property in the options this.setContent(this.options.value || '') @@ -853,8 +853,7 @@ export default class StrivenEditor { }, false); this.body.ondragenter = e => { - console.log(e.dataTransfer.files) - if (!this.body.querySelector('.se-file-drop-dropzone')) { + if (e.dataTransfer.files.length && !this.body.querySelector('.se-file-drop-dropzone')) { const dropzone = document.createElement("div"); const dropzoneTextEl = document.createElement("p"); @@ -882,6 +881,7 @@ export default class StrivenEditor { e.preventDefault(); const file = (e.dataTransfer.files.length && e.dataTransfer.files[0]); + debugger; this.attachFile(file); }