title: How to Cut, Copy and Paste from JavaScript to a User's Clipboard
body: <p>There are <a href="https://stackoverflow.com/questions/127040/copy-put-text-on-the-clipboard-with-firefox-safari-and-chrome?rq=1">multiple</a> <a href="https://stackoverflow.com/questions/400212/copy-to-the-clipboard-in-javascript">similar</a> <a href="https://stackoverflow.com/questions/233719/is-it-possible-to-read-the-clipboard-in-firefox-safari-and-chrome-using-javascr">questions</a> in stackoverflow which deal with how to Cut, Copy, and Paste from JavaScript (in response to a button press, for instance) without the user having to use CTRL+X, C, or V. </p>
  
  <p>All these answers suggest either that you are insane for wanting to do this and that users should never have their clipboards violated in such a profane manner, or to use the hack of an invisible Flash movie (which has questionable support).</p>
  
  <p>However, Google Docs does this, and does not use a Flash movie. You can open a Google Document, Go to the Edit menu, choose "Paste" (or Cut or Copy) and NOT get a browser window that tells you "Your browser security settings don't permit the editor to automatically execute copying operations."</p>
  
  <p>However, go to another rich text editor (<a href="http://ckeditor.com/demo" rel="nofollow noreferrer">CKEditor</a> or <a href="http://www.tinymce.com/" rel="nofollow noreferrer">TinyMCE</a> for instance, but this is common among them all) and try that same command. You will get a message that reads:</p>
  
  <p>"Your browser security settings don't permit the editor to automatically execute copying operations."</p>
  
  <p>So the question is simply: What is Google Docs doing to allow users to Cut, Copy, and Paste via a menu button that doesn't run in to security issues? </p>