W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2012

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

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Thu, 23 Aug 2012 11:40:49 -0700
Message-ID: <CABNRm62hPAwB_SJej=9SpFBatbNN0FgFOFiAOjmjvScMFBNqVg@mail.gmail.com>
To: public-webapps <public-webapps@w3.org>
Cc: Aryeh Gregor <ayg@aryeh.name>, Daniel Cheng <dcheng@chromium.org>, "Hallvord R. M. Steen" <hallvord@opera.com>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:54 GMT