I am new to MVC (a little over a year) and have been quite interested in spell checking for a specific page in my solution. The above options may work for some people, but they didn’t work for me (I’m not very patient and honestly didn’t want to ignore any routes or modified my system.web section of my configuration for something that only 5% of the users of my solution will use, so I did not spend much time on these options).
So:
- I copied the Moxiecode.TinyMCE.dll file to a directory in my project, so future contributors will have dll without google search.
- I added a link to the above DLL to my project.
I created a new controller called SpellCheckController.cs, which contains the following:
public void CheckSpelling() { SpellCheckerModule spellChecker = new SpellCheckerModule(); spellChecker.ProcessRequest(System.Web.HttpContext.Current); }
(don't forget to use Moxiecode.TinyMCE.SpellChecker;)
and just referenced the controller like this in the TinyMCE settings in my opinion:
spellchecker_rpc_url: "@Url.Action("CheckSpelling","SpellCheck")/?module=SpellChecker"
I did not ignore any routes. I haven't added yet another httphandler to what I assume is a pretty long list of handlers for .net, and spell checking works for me now.
I also have the opportunity to go with something else without changing too much (assuming I figure out what the TinyMCE validation tool does with the http context.
PS A text editor with a stack overflow does not have a spell check function, so there are no guarantees with the above spelling :)
Brian source share