PHP and Javascript spell checker
18th March 2003
Last week I commented that Sam Ruby’s spell checking feature could be made even funkier with the addition of a javascript powered “corrections” menu. I spent a few hours this afternoon playing with the idea, and I’ve now got quite a nice proof of concept:
I’ve tested it on Phoenix and IE5 on Windows—I’ll check it on IE6 later on this evening. IE5 gets the menus in the wrong place but other than that it seems to work fine in both browsers. I adapted Sam’s Python code for PHP on the server side, while the client side bit is a whole lot of messing around with the DOM.
If you want to nose around the source code, take a look at this lot:
There are still a few bugs, and I haven’t quite worked out an elegant way to get the menus to behave more like menus, but on the whole it’s worked out pretty well.
More recent articles
- Storing times for human events - 27th November 2024
- Ask questions of SQLite databases and CSV/JSON files in your terminal - 25th November 2024
- Weeknotes: asynchronous LLMs, synchronous embeddings, and I kind of started a podcast - 22nd November 2024