Clipboard Fallback

Use when implementing or debugging copy-to-clipboard in a web app that may be served over plain HTTP — LAN devices, boat servers, embedded UIs. navigator.clipboard exists only in secure contexts, so copy works on localhost in dev and silently breaks on http://<lan-ip> in production; the fix is an isSecureContext-gated Clipboard API call with a document.execCommand('copy') textarea fallback. Covers the recipe, the localhost-testing trap, and why paste has no fallback.

sailingnaturali Updated

File contents

sailingnaturali/claude-skills/tree/main/clipboard-fallback/skills/clipboard-fallback commit 592473b822

Frequently asked questions

npx skillmds@latest add sailingnaturali/clipboard-fallback