Copy text to clipboard JS

Keff - Aug 1 '21 - - Dev Community

Another snippet I tend to google each time I need it, copying to clipboard that is.

The demo does not work here, because "The Clipboard API has been blocked because of a permissions policy applied to the current document"

But you can find it, try it and use it from any of these places:


If you found the content useful, consider supporting me! I post some stuff around here, and have some stuff over on GitHub as well

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .