[
idealisms ]
[ And it just feels good when you're waking up ]
[ Thursday, June 17th, 2004 - 3:10am ]
My attempt at real time spell checking in a web browser.
How about some background. Well,
awu mentioned in a comment that he was reading this article. It's paints an interesting pictures of why Microsoft is scared of web applications, but that's not what I why I'm mentioning in the article. I liked the article because it has a list of 6 things you can't really do well in a web application:</p>
- Create a fast drawing program
- Build a real-time spell checker with wavy red underlines
- Warn users that they are going to lose their work if they hit the close box of the browser
- Update a small part of the display based on a change that the user makes without a full roundtrip to the server
- Create a fast keyboard-driven interface that doesn't require the mouse
- Let people continue working when they are not connected to the Internet
So I read the list as a challenge of things to do well in a web browser. Some of these things people are already making lots of progress (like keyboard-driven interfaces and warning users before losing work), so I decided to tackle spell checking (which
hairylunch also makes mention of).
Anyway, you could have this on a blog for when you're adding a new post or adding a comment. There may be some issues with speed (due to the slowness of regular expressions) and there's a slightly more correct version here. That is, a version that handles HTML a bit better (remember that it's hard to remove HTML with regular expressions).
Update: Looks like Safari has this built into the browser. Wow, that's much more convenient than lots of server requests.
[ |
Thats really cool! Are you going to try to give recommendation for spelling when you spell something wrong, like in the tip so it shows up when you hoover over a word?
-jp