copify-text Load the JS file src/copify-text.js To copy a string just use the below in any event or function. copifyText("text to copy");