Couldn\'t find anything on this with a Google Search.
Does anyone know how to copy some text to the clipboard through GWT Java code? I\'d like to avoid the raw javas
GWT doesn't natively support the $doc.execCommand('copy'); command, but it's super easy.
First set the focus on the item, select the text, then copy it.
myTextBox.setFocus(true);
myTextBox.selectAll();
boolean success = copyToClipboard();
private static native boolean copyToClipboard() /*-{
return $doc.execCommand('copy');
}-*/;