Spartan V SpellChecker
SVSC is available under the GNU LGPL, so as to be usefull in as many environments as possible.
An example of SVSC in action is available here.
- Have aspell or ispell installed on your system. e.g.
apt-get install aspell
- Edit spellcheck.php so that
$aspellcommand is set to reflect your spellchecker of choice.
in our example we use
/usr/bin/aspell -a --sug-mode fast -H -a makes it read from cat, -H allows it to ignore HTML formatting.
- Edit the page where you want to use the spellchecker in. You will need to create a hidden DIV tag where the corrections will take place.
- You will need a button or link or some other item to have an
onClick handler. It will need to set the variable infoId to the ID of the form field you wish to correct. then set correctDiv to the ID of the DIV tag created above. Lastly it will call loadXMLDoc(url), where URL is the location of spellcheck.php.
example.html is included in the download package, it has detailed comments explaining the purpose of each vital line of code.