Usage: Paste to textbox after copy the string from html, rtf, etc.

Code:

<textarea id="clipboard_textarea" ></textarea> <script> var clipboard_textarea = document.getElementById("clipboard_textarea"); clipboard_textarea.style = "width : 100%; height : 300px;"; clipboard_textarea.onpaste = function(event){ clipboard_textarea.value = ""; var items = (event.clipboardData || event.originalEvent.clipboardData).items; for (index in items) { var item = items[index]; if ((item.kind === 'string')){ item.getAsString( function(str){ str = str.replace(/\r/g, ""); clipboard_textarea.value += str; }); } } return false; } </script>