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 4e0d4fe5f6f0f4410292eaedb6c59d40d6957533
parent cc2377bec746197c83465ad05eb8e6847ae2959f
Author: unitehenry <unitehenry@gmail.com>
Date:   Tue, 12 Nov 2019 16:06:02 -0500

style change

Diffstat:
Mdemo/src/App.vue | 1-
Mpackage.json | 2+-
Msrc/striveneditor.js | 6++++--
3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/demo/src/App.vue b/demo/src/App.vue @@ -12,7 +12,6 @@ :placeholder="'Type something in here...'" style="min-height: 300px; width: 800px;" :meta-url="metaUrl" - :toolbar-template="customButton" :on-enter="submitOnEnter" ></striven-editor> <div ref="customButton" style="display: flex; align-items: flex-end;"> diff --git a/package.json b/package.json @@ -1,7 +1,7 @@ { "name": "@striven-erp/striven-editor", "private": false, - "version": "2.5.8", + "version": "2.5.9", "description": "The lightweight zero-dependency Striven WYSIWYG editor.", "main": "./dist", "scripts": { diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -992,8 +992,10 @@ export default class StrivenEditor { hideOption('insertOrderedList'); hideOption('textAlign'); hideOption('removeFormat'); - - if ((this.toolbarTemplate.offsetWidth + this.toolbar.offsetWidth) > this.editor.offsetWidth) { + if ( + this.toolbarTemplate ? + (this.toolbarTemplate.offsetWidth + this.toolbarOptionsGroup.offsetWidth) > this.editor.offsetWidth : + (this.toolbarOptionsGroup.offsetWidth > this.editor.offsetWidth)) { responsiveMinimal(true); } else { responsiveMinimal(false);