scniro / react-codemirror2

Codemirror integrated components for React
MIT License
1.66k stars 193 forks source link

How to prevent default paste event #180

Closed 9aoyang closed 4 years ago

9aoyang commented 4 years ago

In some situation, I need to disable the default paste event use custom, why 7.0.0 remove the event argument in onPaste event, Is there any other way to disable the default paste event

scniro commented 4 years ago

@9aoyang hmh, let me get back to you on that. I did indeed remove the event as the new typings lib suggested the events were no longer in the function signatures of cut copy & paste. Please use 6.0.1 until I am able to get you better information. Thanks!

9aoyang commented 4 years ago

Thanks a lot!

scniro commented 4 years ago

@9aoyang yep this was indeed a problem! Keeping parity with library changes & typings are always tricky 😸 This is hopefully fixed with the 7.1.0 release. Can you please verify when you find a moment?

scniro commented 4 years ago

@9aoyang going to close this, please re-open should you experience the same issue. Thanks!

9aoyang commented 4 years ago

I'm sorry for replying to you late. I just upgraded and now it works fine : )