Created
August 8, 2019 02:17
-
-
Save parzibyte/fc86d42c18ae0b1edc8a6fa1e52a8777 to your computer and use it in GitHub Desktop.
Acceder al portapapeles en JavaScript - https://parzibyte.me/blog/2018/08/24/acceder-al-portapapeles-con-javascript/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
navigator.clipboard.readText() | |
.then(texto => { | |
console.log("Aquí tenemos el texto: ", texto); | |
}) | |
.catch(error => { | |
// Por si el usuario no da permiso u ocurre un error | |
console.log("Hubo un error: ", error); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment