0

I dont want the text to be copied from one textarea to another, I just want that the content should only get copied and the user then could paste it anywhere he wants, using ctrl+v or paste option.

Deepak Jha
  • 31
  • 1
  • 5

1 Answers1

0

CSS

*.unselectable {
    -webkit-user-select: none;
    -moz-user-select: none
}

HTML

<textarea unselectable="on" id="my_textarea"></textarea>
<input type="button" id="btnCopy" value="Copy" />

You can use zclip for copy text to clipboard.

$("#btnCopy").zclip({
    path: "js/ZeroClipboard.swf",
    copy: function(){
        return $("#my_textarea").val();
    }
});
Ravi Dhoriya ツ
  • 4,418
  • 8
  • 33
  • 47