You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.
I downloaded jquery.zeroclipboard v0.2.0
added to my script, it works, as it copy to the clipboard the value I pass it, but it doesn't seem to behave like in the examples...
if the object passed to my function after 'copy' or 'aftercopy' is triggered is : e , e.data is undefined, and I cannot figure out where data is stored...
This is my implementation:
var mOdj = {
copy_column : function(e) {
var
rText = [], idx = 0;
rText[idx++] = 'dummy1';
rText[idx++] = 'dummy2';
rText[idx++] = 'dummy2';
console.log(e);
// Clear out any existing data in the pending clipboard transaction
e.clipboardData.clearData();
// Set your own data into the pending clipboard transaction
e.clipboardData.setData("text/plain", rText.join("\n"));
// console.log(e);
e.preventDefault();
},
copy_verify : function(e) {
console.log(e);
if (e.success["text/plain"] === true) {
console.log("Copy succeeded. Yay! Text: e.data["text/plain"]);
}
else {
console.log("Copy failed... BOOOOOO!!!");
}
},
copy_errors : function(errorEvent) {
console.log(e);
}
}
$(document).ready(function(){
$('#container')
.on('copy', 'img.cClipBtn', mOdj.copy_column)
.on('aftercopy', 'img.cClipBtn', mOdj.copy_verify)
.on('copy-error', 'img.cClipBtn', mOdj.copy_errors);
});
inside copy_verify(e), this line:
console.log("Copy succeeded. Yay! Text: e.data["text/plain"]);
returns a e.data undefined error
any idea on what I am missing?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
hello, thank you for the useful plugin!
I downloaded jquery.zeroclipboard v0.2.0
added to my script, it works, as it copy to the clipboard the value I pass it, but it doesn't seem to behave like in the examples...
if the object passed to my function after 'copy' or 'aftercopy' is triggered is : e , e.data is undefined, and I cannot figure out where data is stored...
This is my implementation:
inside copy_verify(e), this line:
console.log("Copy succeeded. Yay! Text: e.data["text/plain"]);
returns a e.data undefined error
any idea on what I am missing?
The text was updated successfully, but these errors were encountered: