Re: CSS and copy/pasting guidelines

On Mon, Apr 4, 2016 at 7:45 AM, Hallvord Reiar Michaelsen Steen <
hsteen@mozilla.com> wrote:

> On Fri, Apr 1, 2016 at 5:30 PM, Johannes Wilm <johannes@fiduswriter.org>
> wrote:
> > So, if we are proposing three different paste versions:
>
> Well, we have two different plaintext options but need to pick one..
>
> > - A. plaintext exactly as was
> > - B. plaintext with some intelligence applied
>
> Not sure exactly which one you consider "as was" in this context - the
> case the user sees, or the case in the source code :)
>

Correct. That was not good wording on my part. Let's say A is "same as
source code".

>
> > I wonder:
> > - How difficult (or impossible) is it to obtain the same output as A or
> B if
> > one has access to C?
>
> This should be trivial, really - at least if we assume all paste
> targets that understand HTML also have a basic understanding of CSS.
>
> > Would it be possible to just have either A or B
> > browserside and let the client calculate the other one in JS?
>
> I'm not following you here. You can certainly go from *C* to either A
> or B. You can *not* go from A to B or vice versa without having the
> formatting details preserved in C to refer to.
>

Of course. Let me try to reword: Do we really need to provide both version
A and B and C, or would it be enough to provide (A and C) or (B and C);
could the JS calculate B or A if it has C?

For example, JavaScript cannot just apply CSS (without putting it into the
DOM), so if part of the challenge is finding out how various characters are
placed in relation to oneanother once CSS has been applied in order to find
out in what order those characters should be, then that will likely be a
really complex situation.


> Also, that "client" may not run JS - if you paste into an instance of
> a good ol' desktop word processing application for example, the input
> will probably be handled by compiled C(++) code, not JS.


Right, but if it uses the richtext version, I asusme it will also be able
to understand some CSS?

>
> A client getting C *can* choose to derive A or B - but we certainly do
> not want to say the UA must *only* place HTML+CSS, not plaintext
> equivalent, on the clipboard in this scenario. Copying from a web page
> and not being able to paste into Notepad would just be weird.
>

I did not try to propose that. That must have been a misunderstanding.


>
> > - if we have both A and B, how do we decide which one to use in places
> that
> > only allow plaintext input?
>
> That's exactly the challenge we're discussing.
>

Florian seemed to propose that we provide all three versions richtext and
two types of plaintext.

I am wondering if we can get away with leaving out one of the two plaintext
versions.


> -Hallvord R.
>



-- 
Johannes Wilm
Fidus Writer
http://www.fiduswriter.org

Received on Wednesday, 6 April 2016 15:34:49 UTC