• Copies the provided text to the clipboard using the Clipboard API.

    If the Clipboard API is not available or fails, it falls back and creates a new textarea element, sets its value to the text to be copied, selects it, and then uses document.execCommand('copy') to copy the text.

    Parameters

    • text: string

      The text to be copied to the clipboard.

    Returns Promise<void>

    Example

    ix.api.text.copyTextToClipboard("Hello, clipboard!");