Re: [editing-explainer] how does cE=typing handle autocorrect and spelling suggestions? (#37)

Investigating a bit, I am now less sure. The spell checking offered by most popular browsers today is rather primitive because it doesn't take context into account and when a word is more than two letters off, no good suggestions are offered at all.

Additionally, the spell checking is automatically disabled when the right lick menu is overridden and when the text editor is just a little bit more complex than the most primitive possible, it's also impossible to use.

Also, the spell checker language has to be switched by the user and the web editor programmer has no influence on it. 

All in all it seems like an ultra broken concept. I am not sure what the security issues for the browser developers are, except that on Mac OS X the spell checker seems for some browsers to be the system spell checker which have had custom words added and I guess some users would add their most secret passwords into their spell checker(?) Somehow it seems this just won't be resolved. The various proposals made that "just let the browser handle it" or "tell the browser about extra dictionary terms" seem rather unrealistic if we are talking about more than just a very primitive editor with no custom controls.

However, what are the alternatives? 

There is server side spell checking (Aspell/Pspell based), the way some CKeditor  and TinyMCE plugins offer it. There are also some commercial subscription services for grammar checking such as grammarly.  All of these will be rather unacceptable for all projects wanting to offer either A) an offline solution or B) don't want to create a lot of server traffic to provide a function that the users computer really has built-in already.

There are also at least two open source client side solutions: http://code.google.com/p/bjspell/ (not updated since 2009) and https://github.com/cfinke/Typo.js/ (still being hacked on). Both are based on Hunspell. These should provide exactly what editor developers will want. The downside is that the end user needs to download dictionary files (700kb-2MB for western European languages) when visiting a site, and at the same time they will likely have bunch of dictionaries bundled with their OS or browser already. The good thing is that download costs go down and will continue to go down, so with time this issue will be of less importance.

Taking all this together, I would suggest to either completely disable spell checking or add it in the least possible invasive way. Text nodes suddenly changing outside of the control of the editor seem like rather invasive, but it's a lot better than random DOM structures changing, empty text nodes disappearing or text nodes being randomly split or merged. The most important part is that the spell checking can be turned off (as it can today).

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

Received on Thursday, 29 January 2015 00:23:48 UTC