There have been a few web applications I have worked on where there was a need to edit code from within the application. Be it some CSS, HTML, or even some Javascript.
In the past, I've just used a textarea to collection the client entered code. A textarea, however, kind of sucks for writing code. Leaving out you can't do any kind of stylized text, the tab key wont tab on most browsers (because tab puts the focus on other form elements). Not having a tab key really makes code look awful.
To solve this, if only for my own usage, I started 9ne (pronounced “nine”). It's an online code editor that uses Emacs as it's feature guide. It's beta right now, but it is very useable on Mac OS X with Safari or Firefox.
Check it out and let me know what you think. (Eventually I think I am going to make an on-line IDE)