Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Copy to Clipboard

const copyToClipboard = (text) => navigator.clipboard.writeText(text);

copyToClipboard("Hello World");
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #Copy #Clipboard
ADD COMMENT
Topic
Name
3+3 =