Is it possible for the browser to access clipboard when user presss CTRL + C? Using pure Javascript approach.
The idea being, I have a web application that needs to be able to access the clipboard when user press the key combination.
Is it possible for the browser to access clipboard when user presss CTRL + C? Using pure Javascript approach.
The idea being, I have a web application that needs to be able to access the clipboard when user press the key combination.
You can use the navigator
clipboard.
Note: You must preview it directly to browser when you are using Phone.
Look! this is all navigator.clipboard
functions:
navigator.clipboard >
|—— read
|—— readText
|—— write
|—— writeText
to write a text to the clipboard. to this!
navigator.clipboard.writeText("Hello World!");
Note: the object clipboard is a Promise {}