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 c748ad3a98091be8f5599c6d123666934cac79cd
parent 6f7baa4d9eed766b7ab93550ca3a3dfc22b75d3f
Author: Henry Unite <unitehenry@gmail.com>
Date:   Wed,  2 Sep 2020 10:37:13 -0400

Merge branch 'dev'

Diffstat:
Mpackage.json | 2+-
Msrc/striveneditor.js | 5+++--
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/package.json b/package.json @@ -1,7 +1,7 @@ { "name": "@striven-erp/striven-editor", "private": false, - "version": "3.5.5", + "version": "3.6.0", "description": "The editor used for the Striven ERP system.", "main": "./dist", "scripts": { diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -1982,11 +1982,12 @@ export default class StrivenEditor { */ getContent() { const se = this; - const text = this.body.textContent; + const body = se.pruneScripts(se.body); + const text = body.textContent; if (text || se.body.getElementsByTagName('img').length) { const htmlView = !!se.editor.querySelector('.se-html'); - return htmlView ? text : se.body.innerHTML; + return htmlView ? text : body.innerHTML; } else { return null; }