Skip to main content
Copy text to the device clipboard.

Parameters

PropertyTypeRequiredDescription
textStringYesText to copy
successFunctionNoCallback on success
failFunctionNoCallback on failure
completeFunctionNoCallback that always executes

Code Example

my.setClipboard({
  text: 'Hello, world!',
  success: () => {
    my.showToast({ content: 'Copied!' });
  }
});