paste clipboard content from a button

Asked

Viewed 33 times

0

How to take the contents of the clipboard (Clipboard) and paste it into a text from the click of a button.

I found an upcoming jquery code, but I can’t reproduce what I need.

Below the code that shows the contents in an Alert at the time I give the CTRL+V:

$('body').on('paste', 'input, textarea', function(e)
{
    setTimeout(function ()
    {
        alert($(e.currentTarget).val());
    },0);             
});

Below the image of my grid to lighten a little more what I need:

inserir a descrição da imagem aqui

  • Could you explain better what you would like to copy and paste ? I didn’t understand what the download area would be in your print. And where would you like to paste this content ? It’s in some element or what ?

  • Hi Leo, good afternoon! Actually just paste what’s in the clipboard. See the "Paste" button? The idea is to paste the text next to this button to make it easy for the user. The content that goes there can be copied in the same traditional way, with the right button or CTRL + C. What I really want is to make the "Paste" button play the contents of the clipboard in the next textbox.

  • I believe this question has the solution you are looking for: 'https://answall.com/questions/17030/maneira-cross-browser-copiar-texto-para-a- %C3%81rea-de-transfer%C3%Aancia-Clipboard '

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.