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 3aa8ba8e3a49ae0efd56e69fdec1bd8880a44bdd
parent c8afb61cfbf6297ca5fb6b91575ba91720a8bc37
Author: unitehenry <unitehenry@gmail.com>
Date:   Fri,  1 Nov 2019 15:52:15 -0400

fix

Diffstat:
Msrc/striveneditor.js | 18+++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -1044,14 +1044,18 @@ export default class StrivenEditor { this.toolbar.querySelector("#group-textAlign").style.display = "none"; this.toolbar.querySelector("#toolbar-removeFormat").style.display = "none"; - setResponsive(); - - const windowResize = window.onresize; - window.onresize = () => { - this.closeLinkMenu(); - this.closeImageMenu(); + if (this.editor.offsetWidth < 300) { + responsiveMinimal(true); + } else { setResponsive(); - windowResize && windowResize(); + + const windowResize = window.onresize; + window.onresize = () => { + this.closeLinkMenu(); + this.closeImageMenu(); + setResponsive(); + windowResize && windowResize(); + } } }