TO be more specific I want the selected(copied) content(be it any where from browser or notepad..).A person can copy text from anywhere and when he clicks in my application , can i get that selected(copied) content?IS it possible?If yes how?
Asked
Active
Viewed 43 times
0
-
http://caniuse.com/#feat=clipboard – str Jul 21 '16 at 11:11
3 Answers
1
There are ways to capture content the user pastes; they're effectively giving you permission to see that content. But you can't just view the clipboard whenever you feel like it. You'd be able to steal passwords and bank account details and other private information.

Whothehellisthat
- 2,072
- 1
- 14
- 14
0
$('html').on('paste', function(e){ // will trigger on paste in your page
var clipBoard = e.originalEvent.clipboardData.getData('text');
});

Uday
- 1
- 1
-
While this code may answer the question, providing additional context regarding *how* and/or *why* it solves the problem would improve the answer's long-term value. – Michael Parker Jul 21 '16 at 16:46
0
You should see this. May be it will be helpful
http://harttle.com/2015/05/30/accessing-the-system-clipboard-with-javascript.html

spyshiv
- 178
- 1
- 8