From 421d9a97f832a0de30bc97c4e7dd65df759746ce Mon Sep 17 00:00:00 2001 From: Gabe Magee Date: Tue, 14 May 2024 15:15:37 -0700 Subject: [PATCH] fix(insertcontentat.ts): ensure content passed during a simulated paste / input event is string #5150 --- packages/core/src/PasteRule.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/PasteRule.ts b/packages/core/src/PasteRule.ts index a0969673476..574e9d61578 100644 --- a/packages/core/src/PasteRule.ts +++ b/packages/core/src/PasteRule.ts @@ -277,6 +277,7 @@ export function pasteRulesPlugin(props: { editor: Editor; rules: PasteRule[] }): if (isSimulatedPaste) { const { from, text } = simulatedPasteMeta const to = from + text.length + // const to = from + (typeof text === 'string' ? text.length : text.size) const pasteEvt = createClipboardPasteEvent(text) return processEvent({