Answer the question
In order to leave comments, you need to log in
How to paste text from clipboard on click?
There is, for example, the following code:
html:
<div id="txt" contenteditable="true"></div>
<button id="btn">Click</button>
#txt {
height: 30px;
border: 1px dashed grey;
}
$('#btn').on('click',function() {
var pastetext = clipboardData.getData("text/html");
$('#txt').html(pastetext);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question