mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
fix(Editor): make willPaste custom event to be cancelable
This commit is contained in:
parent
73e9d083dd
commit
4d2c80de92
1 changed files with 2 additions and 0 deletions
|
@ -1075,6 +1075,7 @@ class Squire {
|
||||||
let doInsert = true;
|
let doInsert = true;
|
||||||
if (isPaste) {
|
if (isPaste) {
|
||||||
const event = new CustomEvent('willPaste', {
|
const event = new CustomEvent('willPaste', {
|
||||||
|
cancelable: true,
|
||||||
detail: {
|
detail: {
|
||||||
fragment: frag,
|
fragment: frag,
|
||||||
},
|
},
|
||||||
|
@ -1205,6 +1206,7 @@ class Squire {
|
||||||
let doInsert = true;
|
let doInsert = true;
|
||||||
if (isPaste) {
|
if (isPaste) {
|
||||||
const event = new CustomEvent('willPaste', {
|
const event = new CustomEvent('willPaste', {
|
||||||
|
cancelable: true,
|
||||||
detail: {
|
detail: {
|
||||||
text: plainText,
|
text: plainText,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue