Bug

When HTML content is pasted, it is pasting it twice.
Paste only once.
As far as I can tell, the defect is that the onPaste handler is firing a second time with a plain text paste as if return next() was being called to resume the plugin stack after the html is deserialized and inserted
https://jsfiddle.net/1nzto9vd/1/
Pasting also doesn't respect line breaks
That's probably related to how insert fragment works
Hello
Need to change the onPaste
onPaste = (event, editor, next) => {
event.preventDefault() // <---- add me
const transfer = getEventTransfer(event)
if (transfer.type !== 'html') return next()
const { document } = serializer.deserialize(transfer.html)
editor.insertFragment(document)
}
Most helpful comment
Hello
Need to change the
onPastelink