- From: Mihai Sucan <mihai.sucan@gmail.com>
- Date: Sun, 09 Mar 2008 16:20:17 +0200
- To: "Simon Pieters" <simonp@opera.com>, "Ian Hickson" <ian@hixie.ch>, "HTML WG" <public-html@w3.org>
Le Sun, 09 Mar 2008 14:03:09 +0200, Simon Pieters <simonp@opera.com> a écrit: > On Sun, 09 Mar 2008 12:28:45 +0100, Mihai Sucan <mihai.sucan@gmail.com> > wrote: > >> The user won't be able to tell it's CSS generated content or not. The >> user will simply expect he/she can edit "test" as well. > > Consider a realistic case for this, e.g. counters in headings. They > appear automatically when you create a heading, you can't select them > (at least in Opera you can't), and they should be there in the output. > Why should the user be able to edit it? Well, let's take the word processing applications which do exactly what you said. Even in such cases many people are bothered that they can't edit the numbers. This is one of the many reasons why the majority of Word documents created by simple users are of low quality. [1] >>> Should removeformat remove things like 'em' and 'strong' and 'cite' and >>> 'var' and 'b' and 'i' and 'span' and 'a'? >> >> Afaik, this doesn't remove links, it doesn't remove semantical markup >> (e.g. var, kbd, code). It does remove style attributes, b, i, font, >> span, and similar presentational tags. I don't know the exact behaviour >> - it would be best if you would ask some of the implementors (Opera, >> Mozilla). > > I tested Opera and Mozilla, and they do different things, and both are > IMHO undesirable (e.g. Opera removes links, Mozilla removes bold but not > italic). Removeformat is, AIUI, intended to get rid of style information > without loosing "semantics" after pasting in a chunk of text from > another application. I would argue that <b> and <i> should not be > removed since they are generally tied to the content while font family > is generally not. > > Maybe UAs should just strike style information when pasting from another > app directly as to make this command redundant? Style information should not be eliminated on copy/paste. It would break expected behaviour. However, UAs, should, like Word already does, provide the means to paste with styling and without styling. Additionally, it would not be bad to actually define a proper removeformat command, or a new one, which cleans the code and removes any styling. As Alfonso said, any mature WYSIWYG editor does not rely on removeformat. Since then I have included my ReTidy cleaner. Unfortunately, good solutions are not available within the UA. Perhaps I should port my ReTidy to JavaScript. [1] http://lists.w3.org/Archives/Public/public-html/2007JanMar/0192.html -- Mihai Sucan http://www.robodesign.ro
Received on Sunday, 9 March 2008 14:20:35 UTC