W3C home > Mailing lists > Public > www-tag@w3.org > June 2010

RE: Copy to Clipboard - ambush and abuse by javascript

From: Tex Texin <textexin@xencraft.com>
Date: Fri, 11 Jun 2010 03:03:36 -0700
To: "'Paul Libbrecht'" <paul@activemath.org>, '"Martin J. Drst"' <duerst@it.aoyama.ac.jp>
Cc: "'Larry Masinter'" <masinter@adobe.com>, "'Roy T. Fielding'" <fielding@gbiv.com>, "'L.David Baron'" <dbaron@dbaron.org>, "'Tim Berners-Lee'" <timbl@w3.org>, "'W3C TAG'" <www-tag@w3.org>
Message-ID: <000e01cb094d$5cc112c0$16433840$@com>
> Are there general WYSIWYG principles for copy-to-clipboard?

I also with these were defined.
Here is a frustrating example:

If you use text-transform to modify case, when you copy-paste the text
displayed by a browser, you get the casing of the source, not the
transformed text. The following is a short test page you can try.
I would think it preferable to either be pasting the source with markup, or
the text as displayed, but not what actually occurs.


<html lang="en">
 <head>
  <style>
.upper         { text-transform: uppercase;font-weight:bold; }
.lower         { text-transform: lowercase;font-weight:bold; }
.cap           { text-transform: capitalize;font-weight:bold; }
  </style>
  <title>Test Language and CSS</title>
 </head>
 <body>
<p>Original = This text should be all uppercased.<br>
Transformed = <span class="upper">This text should be all
uppercased.</span></p>
<p>Original = THIS TEXT SHOULD BE ALL LOWERCASED.<br>
Transformed = <span class="lower">THIS TEXT SHOULD BE ALL
LOWERCASED.</span></p>
<p>Original 1 = tHIS tEXT sHOULD bE cAPITALIZED.<br>
Transformed = <span class="cap">tHIS tEXT sHOULD bE cAPITALIZED.</span><br>
Original 2 = this text should be capitalized.<br>
Transformed = <span class="cap">this text should be capitalized.</span>
</p>
<p lang="de">[de] Original =  (sharp-s),  (o-diaeresis)<br>
Transformed = <span class="upper"> (sharp-s),  (o-diaeresis)</span></p>
<p lang="tr">[tr] Original = i (i-with-dot)<br>
Transformed = <span class="upper">i (i-with-dot)</span></p>
 </body>
</html>
Received on Friday, 11 June 2010 10:04:13 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:33:06 UTC