Spell check in web applications
8th March 2003
Sam Ruby has enabled spell checking for the preview comment tool on his blog. I wonder how it works... I’ve lost track of the scripting language Sam uses for Intertwingly (PHP? Python? Perl?) but I know PHP can be compiled with support for the Pspell module.
Sam’s user interface is pretty neat—misspelled words are marked up with a span, underlined in dashed red and have suggested spellings listed in the span’s title attribute. Theoretically, it should be possible to build a javascript right-click menu offering alternatives instead (preferably dynamically generated from the list of words in the title attribute using the DOM). Actually modifying the preview textarea text based on the menu selection would be quite a lot harder—it could be done with a simple search-and-replace operation, but doing so might change other words with the same “incorrect” spelling without the user realising.
It would be fun to integrate something like this with a rich text editor, such as the recently announced htmlArea 3.0 that works with Mozilla 1.3b as well as IE (more information here).
More recent articles
- Weeknotes: more datasette-secrets, plus a mystery video project - 7th May 2024
- Weeknotes: Llama 3, AI for Data Journalism, llm-evals and datasette-secrets - 23rd April 2024
- Options for accessing Llama 3 from the terminal using LLM - 22nd April 2024
- AI for Data Journalism: demonstrating what we can do with this stuff right now - 17th April 2024
- Three major LLM releases in 24 hours (plus weeknotes) - 10th April 2024
- Building files-to-prompt entirely using Claude 3 Opus - 8th April 2024
- Running OCR against PDFs and images directly in your browser - 30th March 2024
- llm cmd undo last git commit - a new plugin for LLM - 26th March 2024
- Building and testing C extensions for SQLite with ChatGPT Code Interpreter - 23rd March 2024
- Claude and ChatGPT for ad-hoc sidequests - 22nd March 2024