How to handle paste event in CodeMirror script?

I tried cm.on('paste') and cm.on('inputRead'). None of them worked.

There's a chance it's overridden somewhere by the app. Maybe we could expose this. What are you trying to do?

@laurent I want to intercept user action of inserting image, to OCR the image and insert text instead.

Interestingly, Ctrl+Shift+V will trigger cm.on('paste').