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 283a950768fbb758c416c371a435405c7c3a27a9
parent 7e17f726ed0bbade351e395decc90b7c03362e78
Author: sanjogs <sanjogsharma@gmail.com>
Date:   Fri, 26 May 2023 15:12:39 -0400

Merge branch 'dev'

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

diff --git a/package.json b/package.json @@ -1,7 +1,7 @@ { "name": "@striven-erp/striven-editor", "private": false, - "version": "3.15.0", + "version": "3.16.0", "description": "The editor used for the Striven ERP system.", "main": "./dist", "scripts": { diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -2955,8 +2955,15 @@ export default class StrivenEditor { }; link.onclick = e => { - - if (!link.querySelector('.se-link-options')) { + if(e.ctrlKey || e.metaKey){ + const anchor = document.createElement('a'); + anchor.setAttribute('href', link.getAttribute('href')); + anchor.setAttribute('target', '_blank'); + document.body.append(anchor); + anchor.click(); + anchor.remove(); + } + else if (!link.querySelector('.se-link-options')) { const linkOptions = document.createElement('span'); linkOptions.setAttribute('class', 'se-link-options'); linkOptions.setAttribute('contenteditable', false);