RE: Copy to Clipboard - ambush and abuse by javascript

> 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