Copying data from the browser into your clipboard is a small feature, yet a quite powerful one. No more manual selecting & crtl + c does save a...
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
thank you for this article, it was very helpful
Hey thanks this is good. Just found a typo:
'input'
should be'INPUT'
because tag names are uppercase.Thank you guy I need this.
Glad it helped. Out of curiousity: Did you go for the execCommand or navigator option?
Navigation option in my vision it's so much better
Also worth mentioning Transmat for a third option using the DataTransfer API, this will also include drag-drop! :-)
google.github.io/transmat/
Cool idea. I've already used DataTransfer for dropping a file in the browser for fileupload, didn't know it works the other way around as well
Method 2: Clipboard API
How can I integrate it into my chrome extension because it doesn't work in the extension while it works in the normal browser.
Let me put it this way, I print a part of the source of a web page to my plugin and I want it to copy when a button is clicked.
I think chrome extensions run in their own sandbox environment. Instead of requesting permission in the browser, you need to 'proxy' them towards the env plugins run within.
There's this section in the docs describing how to do so, I hope it'll help you: developer.chrome.com/docs/extensio...
excellent!
you are kind
thx!
Try: