Skip to content

Commit

Permalink
fix(insertcontentat.ts): ensure content passed during a simulated pas…
Browse files Browse the repository at this point in the history
…te / input event is string

#5150
  • Loading branch information
gabemagee-ev committed May 15, 2024
1 parent ef7d195 commit 421d9a9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/src/PasteRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 421d9a9

Please sign in to comment.