Re: [w3c/editing] spellchecking - how to give JS devs more control (#166)

> I don't think it would be helpful in any way.

I disagree on that. In combination with a cancelable beforeinput event, this could make for something useful. For example, in a collaborative editor, one may want to disable spell checking for ranges of text that a collaborator already has checked and accepted. Or one may want to mark a range as dirty because it has not been checked before.

> Implementing a custom spell checker. That's done by companies like Grammarly and WebSpellChecker. 

For Fidus Writer I implemented it using the open source [LanguageTool](https://languagetool.org/) which is simply bundling most of the open source dictionaries/grammar checkers there are out there. The size of that package is around 160MB for a set of mot major languages. Maybe in 10 years time that is something we can just embed in a webpage, but for now it still needs to be done server side. But the integration of that has to take place through a specialized connector in the JS editor that is aware of what is what -- for example, in the implementation I needed to make sure it ignores citations as well as text that has been tracked as deleted. If one wanted to create something that works on all JS editors without specialized plugins, one would have to have each of the JS editors implement some kind of serialization/deserialization method that ignores/hides content that should not be taken into consideration when doing the check.

>    * Some edge cases like `woo<b>rd</b>`, `woo<span>rd</span>` or `woo<span></span>rd`. Right now, many of them are not handled correctly – "woo" and "rd" are treated as two separate words.

That does not look good. Have you tried this on all browsers on all OSes? Last I checked on mobile, Android would let words go across such boundaries.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/166#issuecomment-426970714

Received on Thursday, 4 October 2018 10:42:32 UTC