Argument | Description | Types / Required |
text | The text to put onto the clipboard. | string, number
required |
On Android, for security reasons, the text copied to the clipboard is temporarily shown to the user.
The action returns undefined.
The action throws an exception if any of its arguments are not specified in a valid form. On Android, the action throws an exception if there is an error accessing the clipboard.
let clipboardText = CS.Clipboard.getText();
if( clipboardText === undefined ) {
clipboardText = "<There was no text on the clipboard.>";
}
clipboardText = "Clipboard text modified by CSPro at " +
new Date().toString() + ": " +
clipboardText;
CS.Clipboard.putText({
text: clipboardText
});