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 was archived by the owner on Jun 2, 2025. It is now read-only.
Arthur Guiot edited this page Aug 23, 2017
·
1 revision
How does it works?
This function is simply made to help you copy something to the clipboard (without having the user pressing Ctrl+C on Windows and ⌘C
Simply input a String in this function and it will automatically copied to the clipboard, if the Browser supports it.
If it doesn't, DisplayJS will show up a window.prompt that will ask the user to select the text and press Ctrl+C.
How to use it?
Example
$.then(function{$.copy("DisplayJS is the best JavaScript framework ever!");},function{alert("Text copied!")});