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 23f7071c6d9daf51c9dd02d62a58e2097951b34e
parent 8850cd3b87b451b13913ce7d87f467fd70f62a63
Author: unitehenry <unitehenry@gmail.com>
Date:   Tue, 12 Nov 2019 08:08:17 -0500

insert html on link paste firefox and edge

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

diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -445,7 +445,11 @@ export default class StrivenEditor { if (this.validURL(string)) { e.preventDefault(); - document.execCommand('insertHTML', true, `<a href="${string}">${string}</a>`); + if(this.browser.isEdge() || this.browser.isFirefox()) { + document.execCommand('insertHTML', false, `<a href="${string}">${string}</a>`); + } else { + document.execCommand('insertHTML', true, `<a href="${string}">${string}</a>`); + } // get meta data if (this.options.metaUrl) {