The ExpressionEngine spell checker is a fairly complex beast, especially if you are not a Javascript guru, which I freely admit that I am not. The initial concept script was written towards the end of February over the course of two days, and then I spent another three weeks perfecting it and insuring that it worked in all of the major browsers while failing gracefully in older browsers like Mac IE 5. Unlike PHP, Javascript requires some serious mental investment just to write a script because it seems so unstructured and limited compared to what you can do with PHP. Not exactly an intuitive language and the browser compatibility problems slowly drives a developer to madness. Mark my words, AJAX will be the downfall of many a developer and their fragile psyches.
Right, so the script has been abstracted so that it can be used in a variety of different parts of ExpressionEngine’s Control Panel with minimal duplication of code. The power of abstraction at work, be amazed. The main components that you will be using are located in the core.spelling.php file and are contained in a class ever so aptly called ‘Spellcheck’ with various class methods being used to output the javascript code needed to control the spell checker and processing the text sent by the AJAX portion of the script.
