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 38e3b5614873c85a381fe678ebfd97a30c144547
parent 9465f4a58751fe666ac0026025181824ddc27517
Author: Wagner Souza <wagner.souza@accenture.com>
Date:   Mon, 21 Oct 2019 10:21:11 -0300

Do browser detection before looping elements

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

diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -761,7 +761,10 @@ export default class StrivenEditor { } const bodyLinks = this.body.querySelectorAll("a"); - [...bodyLinks].forEach(link => !this.browser.isFirefox() && (link.contentEditable = 'false')); + + if (!this.browser.isFirefox()) { + [...bodyLinks].forEach(link => (link.contentEditable = 'false')); + } linkMenuFormInput.value = ""; this.closeLinkMenu();