2

I want to copy text and image mixed content into the text-area, my code like this:

<!doctype html>
<html lang="en">
 <head>
  <title>Document</title>

 </head>
 <body>
  <input type="hidden" name="">
<textarea id="ta" name="" rows="30" cols="100"></textarea>
  <script type="text/javascript">
  <!--
 document.getElementById("ta").addEventListener('paste', function(e) {
  console.log(e);
 }, false);
  //-->
  </script>
 </body>
</html>

So,I select a snippet content mixed text and image from a web page, paste to the text-area of my page, only just text content in the clipboardata items. But it copy image from a webpage, it's work fine. I can paste just only text or just only image , but how to paste text and image mixed.

tedeum
  • 185
  • 3
  • 14
  • Its not possible with ` – Manwal Mar 21 '17 at 04:00
  • Possible duplicate of [Rendering HTML inside textarea](http://stackoverflow.com/questions/4705848/rendering-html-inside-textarea) – Manwal Mar 21 '17 at 04:01
  • this isn't solve my problem, i want to get clipboard data with text type and file type together,i can only get text type data when they mixed。so, my problem is how to get full data from clipboard, not to render data in html。 – tedeum Mar 21 '17 at 04:59

0 Answers0