There are several similar questions in stackoverflow that concern how to cut, copy, and paste from JavaScript (in response to a button click, for example), without the user using CTRL + X, C, or V.
All of these answers either assume that you are crazy for wanting to do this, and that users should never have their buffers violated in this way, or use hacking of an invisible Flash movie (which causes questionable support).
However, Google Docs does this and does not use a Flash movie. You can open a Google document, go to the "Edit" menu, select "Paste" (or "Cut" or "Copy"), and DO NOT get a browser window that says: "Your browser’s security settings do not allow the editor to automatically perform copy operations "
However, go to another rich text editor ( CKEditor or TinyMCE , but this is common among everyone) and try the same command. You will receive a message that reads:
"Your browser’s security settings do not allow the editor to automatically perform copy operations."
So the question is simple: what are Google Docs doing to allow users to cut, copy, and paste through a menu button that doesn't work on security issues?
source
share