I have a question about jquery.
I know we can detect copy with jquery like this :
$(\"#textA\").bind(\'copy\', function() {
$(\'span\').text(\'copy b
You can use this
function getSelectionText() {
var text = "";
if (window.getSelection) {
text = window.getSelection().toString();
} else if (document.selection && document.selection.type != "Control") {
text = document.selection.createRange().text;
}
return text;
}
$(document).keypress("c",function(e) {
if(e.ctrlKey)
alert(getSelectionText());
});
this should be work