From 4d2c80de92ad396181b897afe8087931c0115e5a Mon Sep 17 00:00:00 2001 From: Illia Kyselov Date: Thu, 8 Feb 2024 11:36:30 +0200 Subject: [PATCH] fix(Editor): make willPaste custom event to be cancelable --- source/Editor.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/Editor.ts b/source/Editor.ts index 67a1fae..6be5ec4 100644 --- a/source/Editor.ts +++ b/source/Editor.ts @@ -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, },