Ever wondered how rich text editors and drawing tools on the Web implement copy and paste functionality?
- Paste an image from system clipboard into an app
- Copy/paste formatted text (html) from/to an app
- Copy and paste custom objects within an app
The trick basically comes down to using a hidden text input element and hijacking the clipboard events that are happening on it.
See the article below for implementation details: