[Clipboard API] Add a flag to indicate paste-as-text to beforepaste and paste events

Hi all,

We (Google) would like to propose to add a boolean flag indicating whether
the user intended to paste as plain text or rich text.

*Problem*
Many modern Web browsers (including Chrome, Safari, Firefox, etc...)
support regular paste and paste as text or paste matching the destination
style. What the latter does is to paste the plain text content (i.e.
"text/plain") instead of rich text content (e.g. "text/html").

However, this user intent is not exposed to Web apps in paste and
beforepaste events. So apps like Google docs do not have a way of detecting
whether the user had intended to paste as text or paste as rich text.

*Proposal*
Add a boolean flag to beforepaste and paste events indicating whether the
user had intended to paste as text or rich text. (pasteAsText IDL
attribute?)

Best regards,
Ryosuke Niwa
Software Engineer
Google Inc.

Received on Thursday, 23 August 2012 18:41:50 UTC