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 56ff4f6d66dd4a3c9b0a718c4a864a71a533d883
parent 419cf6aa5ee975c19fab7b8f34001973679fb8f5
Author: sanjogs <sanjogsharma@gmail.com>
Date:   Fri, 10 Feb 2023 14:32:17 -0500

#153 input event is dispatched after inserting link and making links

Diffstat:
Msrc/striveneditor.js | 15++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -1335,9 +1335,8 @@ export default class StrivenEditor { } // trigger input event - if (se.body.oninput) { - se.body.oninput(); - } + let inpEvent = new Event('input',{cancelable:true, bubbles:true}); + se.body.dispatchEvent(inpEvent); se.closeLinkMenu(); } else { @@ -3121,12 +3120,10 @@ export default class StrivenEditor { } this.makeLinksClickable(links); - // Trigger oninput event - if (se.body.oninput) { - se.body.oninput(); - } - // setTimeout(() => { - // }, 10); + // Trigger input event + let inpEvent = new Event('input',{cancelable:true, bubbles:true}); + se.body.dispatchEvent(inpEvent); + } /*