Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Request: Copy without onClick Event #218
I would like to suggest the API allow for a programatic copy without a click event. The use case here is better integration with a framework like React where I want to use react's onClick bindings.
Optimally it would work as:
After playing with the code, it seems that this could be accomplished by a singleton Clipboard in the copy function that tracks nothing.
I gave this a quick attempt via adding the following, but the
Please let me know if you think this is a good idea and any suggestions on how to make it work. I can make the PR.
We already have this on the wiki (https://github.com/zenorocha/clipboard.js/wiki/Known-Limitations), but as soon as we redesign the site we can include it over there.