- From: Johannes Wilm <johannes@fiduswriter.org>
- Date: Sat, 26 Mar 2016 02:57:48 +0100
- To: Hallvord Reiar Michaelsen Steen <hsteen@mozilla.com>
- Cc: fantasai <fantasai.lists@inkedblade.net>, "public-editing-tf@w3.org" <public-editing-tf@w3.org>
- Message-ID: <CABkgm-S9RqaNdpjY+4LPxxkOC9FbN5SCMrT0L690kURNsbUSZQ@mail.gmail.com>
On Thu, Mar 24, 2016 at 10:27 PM, Hallvord Reiar Michaelsen Steen < hsteen@mozilla.com> wrote: > On Wed, Mar 23, 2016 at 12:07 AM, Johannes Wilm > <johannes@fiduswriter.org> wrote: > >> The CSSWG discussed the effect of 'text-transform' on copy/pasted text > >> last year: > >> https://lists.w3.org/Archives/Public/www-style/2015Apr/0282.html > > > > This sounds like this is about the plain text version of the copied > > contents. There it may make sense. > > > > Just to make sure: the html/richtext version should probably not do > anything > > like this, as JS editor programmers will want o manipualte clipboard > > contents before the actual pasting is happening, cleaning it up in ways > we > > cannot quite imagine here right now. > > > > Also, I wonder if this is something the clipboard API people have an > opinion > > about (CC Hallvord). > > I do have an opinion (FWIW), in short we should strive to not surprise > the user. If the user thinks s/he is copying upper-case text we should > paste upper-case text. So that's what I'd recommend doing for > plain-text. For rich text we should grab the original source code > including the case and preferably include a CSS fragment that does the > transform. > If we can do it in a way that is predictable to the web developer and also something that one can get around by filtering the HTML before inserting the paste, I think that will be fine. For richtext, what I would like not to happen is for the browser people to make their own interpretations of what is supposed to happen without letting the the web developer have a chance of intervening. Things like "Oh, the user is pasting some text from Ms Word that contains footnotes. Well, we're on the web, where footnotes don't exist, so let's just get rid of those. Surely the user didn't really want them anyway" will turn into a headache for a lot of JavaScript developers. Same applies if one just capitalizes text directly in the richtext-version instead of doing it through CSS. What the default type of richtext-pasting looks like is less important, I think. As long as things can be undone in JavaScript, it's fine to make assumptions for how to paste by default. I agree with Yoshifumi that it is not obvious for users why generated content is not selectable and cannot be copied, not even in the plaintext version. > >> One principle that was proposed is that CSS in general shouldn't affect > >> copy/paste operations except for > >> * generated content > >> * the 'display' property > > What about hidden? If I have this document: > <p style="visibility:hidden">Hello world!</p> > and do ctrl-a, ctrl-c - what should the plain text on the clipboard > be, if anything? Or opacity:0? This is perhaps best covered by people > spec'ing Selection-stuff though. > -Hallvord > -- Johannes Wilm Fidus Writer http://www.fiduswriter.org
Received on Saturday, 26 March 2016 01:58:17 UTC