Recently code.google.com added the feature to edit a file and syntax highlight it!
From what I can understand they added a textarea along with at iframe, where the textarea is where you type in content and the iframe displays the formatting. The textarea is moved up ( like -10000 px or something ) so it is invisible.
What I don't get is how they manage to have the iframe content behaving like a textarea. For instance if you copy and paste a bunch of code they format it immediately.
This is very interesting. Can anyone explain a bit on how does this works?