Asiri Rathnayake wrote:
On Mon, Oct 27, 2008 at 5:50 PM, Marius Dumitru Florea < [email protected]> wrote:
Hi devs,
Let's consider the following scenario:
* Edit a new page with the new WYSIWYG editor. * Type a word like "ubuntu". * Move the caret inside the word like "ubu|ntu". * Press the Bold button or type CTRL+B.
Question: What is the expected behavior?
a) Apply the inline style (bold) only to the insertion point. The next letters typed will have this style applied. b) Apply the inline style (bold) to the word that contains the insertion point ("ubuntu").
Note: b) is the current behavior in Open Office and IE. FF behaves as in a). The behavior currently implemented in the new WYSIWYG editor is a).
Also, by choosing b) I avoid the use of the special space character in IE (see my previous mail), but I have to re-implement the current behavior of the new WYSIWYG. I need around 2 days for it. Of course, it will work for any inline style like bold, italic etc.
As a user I would expect the behaviour in a) (personal opinion). But if b) is currently used existing editors and it also let's us go around a hacky solution. I would say +0 for b).
Why would you expect a)? It doesn't seem intuitive to me. It does seem a bit consistent, since if you're outside the word and click bold, then you start writing bold, without anything already existing being turned into bold. But intuitive, no. I expect (and both MS Word and OO Writer do this) that when I click inside a word and press the B button, that word becomes bold. I don't (almost) ever need or want to start typing bold inside a word. If I want part of the word to be bold, I write the full word, select the part that I want bold, and click the B button. Isn't this what everybody would do? To Marius and the rest of the WYSIWYG team, the final goal is that the editor behaves as the user expects, not as the browser is coded. We should stick to what desktop products do as much as possible, unless their behavior strongly contradicts what we think the user expects. Of course, having a feature working sooner is more important than waiting for all the browser misbehaviors to be corrected. Working feature first, bug workaround afterwards (only other people's bugs, as we should not produce bugs in our code in the first place). -- Sergiu Dumitriu http://purl.org/net/sergiu/