Skip to content

IonutLaceanu/copy-to-clipboard

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Copy to clipboard

Simple module exposing copy(input: text) function that would try to use execCommand with fallback to IE specific clipboardData interface and finally, fallback to simple prompt with proper text content & 'Copy to clipboard: Ctrl+C, Enter'

API

copy(input: text) - tries to copy text to clipboard.

Browser support

Works everywhere where there's prompt available. Works best (i.e. without additional keystrokes) in Chrome and, supposedly, IE. FF support to come soon-ish.

Note: not working on IOS atm

UI components based on this package:

See also

About

Copy stuff into clipboard using JS

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%