Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 8, 2019 02:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/fc86d42c18ae0b1edc8a6fa1e52a8777 to your computer and use it in GitHub Desktop.
Save parzibyte/fc86d42c18ae0b1edc8a6fa1e52a8777 to your computer and use it in GitHub Desktop.
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