Copying text to the clipboard shouldn't be hard. It shouldn't require dozens of steps to configure or hundreds of KBs to load. But most of all, it shouldn't depend on Flash or any bloated framework.
That's why clipboard.js exists.
https://clipboardjs.com/
In this new version, we updated the sample to include a sample with hidden labels/inputs.
Changed from the previous version.