I had been hunting for a good web based code editor when I came across CodeMirror at http://www.codemirror.net.
Great project and a lot of hard and smart work indeed.
I am a great fan of GWT and try to move anything and everything that comes my way to GWT
The result is gCodeMirror project at Google Code and GitHub.
If you are interested in directly jumping to a demo, browse to this test URL.