0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-21 23:03:11 -05:00

fix(Editor): make willPaste custom event to be cancelable

This commit is contained in:
Illia Kyselov 2024-02-08 11:36:30 +02:00 committed by Neil Jenkins
parent 73e9d083dd
commit 4d2c80de92

View file

@ -1075,6 +1075,7 @@ class Squire {
let doInsert = true;
if (isPaste) {
const event = new CustomEvent('willPaste', {
cancelable: true,
detail: {
fragment: frag,
},
@ -1205,6 +1206,7 @@ class Squire {
let doInsert = true;
if (isPaste) {
const event = new CustomEvent('willPaste', {
cancelable: true,
detail: {
text: plainText,
},