Function copyToClipboard

Copies the given text to the clipboard.

  • Parameters

    • text: string

      The text to be copied.

    Returns Promise<boolean>

    • A promise that resolves to a boolean indicating whether the copy operation was successful.

Methods

  • Parameters

    • fn: ((text: string) => void)
        • (text): void
        • Parameters

          • text: string

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • ref: ((text: string) => void | Promise<void>)
        • (text): void | Promise<void>
        • Parameters

          • text: string

          Returns void | Promise<void>

    Returns void