Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

copy to clipboard js

navigator.clipboard.writeText('some text');
// the document must be focused first (call .focus() on a button/input...)
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #copy #clipboard #js
ADD COMMENT
Topic
Name
9+3 =