I've defined a custom block as a plugin, and passed that plugin to Editor.js. When I copy and paste one such block, its onPaste() event fires. But when I copy-and-paste two or more such blocks, their onPaste() events do not fire.
Steps to reproduce:
Highlight and copy two blocks.
On a newline, paste those two blocks.
Expected behavior:
onPaste() function should fire, but does not.
I've defined a custom block as a plugin, and passed that plugin to Editor.js. When I copy and paste one such block, its
onPaste()
event fires. But when I copy-and-paste two or more such blocks, theironPaste()
events do not fire.Steps to reproduce:
Expected behavior:
onPaste()
function should fire, but does not.Screenshots: https://user-images.githubusercontent.com/38993262/154167067-d03c8581-563c-4108-93db-99ece2a1f4d7.mov
Device: MacBook Air (M1, 2020) Browser: Chrome Version 98.0.4758.80 (Official Build) (arm64) OS: macOS Big Sur Version 11.5.2
Editor.js version:
"@editorjs/editorjs": "^2.18.0"
Plugins you use with their versions:
"@editorjs/header": "^2.5.0"
"@editorjs/paragraph": "^2.7.0"
Find below the full code for my custom block as a plugin: