Re: [editing-explainer] replaceText input event could span multiple Typing Nodes (#50)

> I think we can wait on a spec for what constitutes breaking a word. I don't think there are a million possibilities, nor do I think a slight variation on this specific behavior from browser to browser is a show-stopper for users. 

Well, it kind of is. The entire point with this new spec is that it really is truly and fully spec'ed in a way that does not open for weird surprises for editor developers. If this is not spec'ed, we really don't know what is going on, and then we are back where we started out with contenteditable as it is now.

If there is to be a proposal to allow for this, this needs to be fully spec'ed. if it cannot be spec'ed now, it will have to wait for a later version of the contentEditableTyping spec. We can allow for spell checking within text nodes now and at a later stage open for spell checking across nodes, without breaking anything. The spell checking already returns a range, so that should be extensible in the future if this is ever spec'ed.

> You mentioned at first that you thought it would be complicated for the editor dev. I really don't see how. 

LibreOffice and apparently Safari haven't figured out how to do this without losing formatting. And they only need to deal with simple styling elements -- not all the things one may need in a WYSIWYM editor such as data attributes, etc. .

> Your editor code will have pretty much everything that is needed already written to handle other intents. 

This is different. I can implement this, but in many situations I can decide that I simply will not permit it for whatever reason or handling it in a very specific way (for example, remove an entire figure although only the figure caption was part of the selection), without the user getting the feeling that it is broken.

Spell checking across elements is different. If the user sees the little red line, and a right click menu that permits the user to select a word... but when the user selects one of the words, and nothing happens and the read line doesn't even disappear, then that seems broken.

So instead as an editor developer I will have to figure out what I need to insert to make the spell checker not do that. Maybe inserting a 1x1 px white image between two text nodes will do the trick? How about a zero width canvas element? Maybe do something about borders which I then need to hide in some other way so that the user doesn't notice... and because it's not spec'ed the needed trick will probably differ from browser to browser and browser version to browser version, all that being extremely hackish.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing-explainer/issues/50#issuecomment-105329756

Received on Monday, 25 May 2015 22:46:28 UTC