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 77afd6f4db285b641f40564f11adb9b0ca35d0ae
parent 0412582c475bd5aa43430c4c85a12ed050d563b9
Author: Henry Unite <unitehenry@gmail.com>
Date:   Tue,  8 Sep 2020 09:04:37 -0400

respond font selections

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

diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -1856,10 +1856,11 @@ export default class StrivenEditor { [...that.toolbar.getElementsByClassName('se-toolbar-selection')] .forEach(sl => { - sl.style.display = isResponsive ? 'none' : null; + const respond = that.editor.offsetWidth < 500; + sl.style.display = respond ? 'none' : null; const { nextElementSibling } = sl; if(nextElementSibling.classList.contains('se-divider-section')) { - nextElementSibling.style.display = isResponsive ? 'none' : null; + nextElementSibling.style.display = respond ? 'none' : null; } })