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 46f6ab9557dfaca0cd832a4f16a56c5a1ef3f2b6
parent 2cdbd7222110738a1c1079e68d22bcbd37268b9a
Author: sanjogs <sanjogsharma@gmail.com>
Date:   Fri,  8 Dec 2023 17:09:09 -0500

link and image options are filtered out from the editor content #158

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

diff --git a/package.json b/package.json @@ -1,7 +1,7 @@ { "name": "@striven-erp/striven-editor", "private": false, - "version": "3.16.0", + "version": "3.17.0", "description": "The editor used for the Striven ERP system.", "main": "./dist", "scripts": { diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -2139,6 +2139,9 @@ export default class StrivenEditor { [...body.querySelectorAll('[contenteditable="true"]')] .forEach(ce => ce.removeAttribute('contenteditable')); + //remove any link and image options + [...body.querySelectorAll('.se-link-options')].forEach(lOpt=>lOpt.remove()); + [...body.querySelectorAll('.se-image-options')].forEach(iOpt=>iOpt.remove()); if (body.textContent || se.body.getElementsByTagName('img').length) { // const htmlView = !!se.editor.querySelector('.se-html');