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

> Ok, meaning that there is no specification that defines when they are and when they are not.

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. Native spell-check already varies significantly from browser to browser so do we want to go in and spec that too? If things get out of hand wrt to word-breaks then we can add a spec for it.

> it does spell checking across styling borders. But when one corrects a word, it loses part of the styling. 

Yes Safari does the same. I wouldn't do it that way, but that's just me.

> When editing HTML, there may be other more complex parts that one simply does not want the browser to mess with

I don't want the browser to mess with any of it either. As I see it the spell check triggers a Device-Independent Event that includes a Range (that may span multiple Elements) and the editor takes care of replacing that range with the event's content data as they see fit. That Event has no default behavior so the browser never messes with the HTML.

You mentioned at first that you thought it would be complicated for the editor dev. I really don't see how. Your editor code will have pretty much everything that is needed already written to handle other intents. Consider paste-over-selection: you have to take a Range that may span multiple Elements, figure out how to remove the contents, then add the contents being pasted. If your editor can do that then your editor can handle spell-check across Element boundaries.


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

Received on Monday, 25 May 2015 22:29:04 UTC