MAIDR Documentation - v3.75.0
    Preparing search index...

    Function copyToClipboard

    • Writes text to the system clipboard.

      navigator.clipboard is unavailable on insecure origins and on file:// pages — both of which MAIDR runs on routinely, since py-maidr and r-maidr write charts to standalone HTML files — so a execCommand fallback covers the cases the async API refuses.

      Parameters

      • text: string

        The text to place on the clipboard.

      Returns Promise<void>

      Error if neither the async API nor the fallback can copy.