I'm implementing a .net web forms spell checker in one of our applications.
This application is only run internally and the clients do not have access to the internet so I cannot use an online spell checker like google's.
I came across many posts on SO that advocate using NetSpell. However I've been unable to figure out how to hook it up to a text editor like tiny mce.
Is there an example somewhere that I can follow?
Is there an easier way to get spell checker working?
Ok here is what I found out.
TinyMCE has two commands that it uses to perform a spellcheck. These commands are sent in json format and have the same syntax.
In my usage I have to use a specific phonetic spellcheck routine. So I parse the json request call my spellcheck and then generate a json response.
POST
id - string id, generated by tinyMCE
method - either the string "checkWords" or "getSuggestions"
params - an object array, for checkWords it is (<string>, <stringarray>) for getSuggestions it is (<string>, <string>)
Expected Response
result - a string array
id - the same id from the post
error - An error message I'm assuming, I always just return null.
Example usage
Post
{"id":"c0","method":"checkWords","params":["en",["This","is","a","sentancce","woth","speeling","missteaks"]]}
Expected Response
{"result":["sentancce","woth","speeling","missteaks"],"id":"c0","error":null}
Post
{"id":"c0","method":"getSuggestions","params":["en","sentancce"]}
Expected Response
{"result":["sentence","sentenced","sentences","sentience"],"id":"c0","error":null}