title: How to paste on click? It works in google docs
body: <p>I want to be able to initiate real paste event when user clicks. I can understand this may be a security issue, because if any webpage had access to users clipboard, that would be bad. So I thought all browsers disallow accessing clipboard data.</p>
  
  <p>But for example in google docs (in the word-like application), I can Paste from custom context menu (right mouse click on a html element pretending to be a context menu), even if the clipboard data has been copied to clipboard in different application like Microsoft Paint. This works in Google Chrome browser, which is the browser of my interest.</p>
  
  <p>I thought they do it using flash, but it <strong>still works</strong> even if I completely disable flash in chrome. There was a <a href="https://stackoverflow.com/questions/9658282/javascript-cut-copy-paste-to-clipboard-how-did-google-solve-it">question</a> about this already, but the answer mentioned there is not correct. Another answer of that question suggests that google is using a chrome extension for this, but it <strong>still works</strong> even if I disable all extensions in chrome.</p>
  
  <p>How to reproduce in windows:</p>
  
  <ul>
  <li>disable flash in chrome, disable all extensions</li>
  <li>restart</li>
  <li>go to google docs and open new empty writing document (Docs, not spreadsheet)</li>
  <li>run microsoft paint application in windows</li>
  <li>draw something in microsoft paint, press Ctrl+A to select all, Ctrl+C to copy</li>
  <li>switch back to chrome to the docs empty page, and rightclick the empty page</li>
  <li>select Paste from the artificial context menu (notice the context menu is not the native menu from windows, but it comes from the html webpage of google docs)</li>
  <li>you will see that the clipboard image was pasted to the docs document (!)</li>
  <li>how do they do this?</li>
  </ul>
  
  <p>I know how to access the clipboard data if user presses Ctrl+V on my webpage, because this triggers Paste event on the current window. But, how do I either <strong>access the clipboard data</strong> or <strong>initiate the paste of actual clipboard data</strong> (eg. a bitmap copied in mspaint) in javascript (or using jquery) while user just clicks a button or div?</p>