Fork me on GitHub

Copee Example

Copy text from browser to clipboard...natively!

btn1.addEventListener('click', function (e) {
    var success = toClipboard('Magic happens here');
    showAlert(success);
});

Example 1: Copy hard-coded text

btn2.addEventListener('click', function (e) {
    var success = fromElement(input);
    showAlert(success);
});

Example 2: Copy from input element