I can't find any document or window object that I can use https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event.
I know there is a clipboard variable but is there an event?
It seems like it would be possible to detect pastes with fairly high confidence by:
workspace.onDidChangeTextDocument
(workspace api) to get all text editsenv.clipboard.readText()
to get the current content of the clipboardTextDocumentChangeEvent
, check each contentChanges
entry's text
and see if it matches the clipboard textIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With