When I copy some content in a webpage, what will really happen? What will be saved in my clipboard buffer?
I once thought it’s plant text, however, I can paste it’s style or images in M$ Word or some web WYSIWYG editors such as TinyMCE. And it isn’t html code, otherwise I will see tags in gedit or Notepad.
My main questions are:
- where are the document which explains the knowledge about clipboard?
- When I make webpages, is it possible to control what users will copy into clipboard with javascript?
Background
In Windows, there is a plain text clipboard and a MIME-aware clipboard; when you copy, you’ll get the plain text version and the rich HTML. Text editors like Notepad will just take from the plain buffer, whereas a program like Word will look in the MIME section and try to do clever stuff with the HTML it finds there.
GUI toolkits in other OSs probably do similar things.
Your questions
I don’t know.
Not really; the GUI and the browser are responsible for what the “clipboard” even means.