The Man in Blue > Experiments > widgEditor is a WYSIWYG editor for HTML that replaces textareas in the browser and is written in JavaScript. It has an integrated fallback to normal textareas, so that browsers without JavaScript can still work with normal text. And it produces clean XHTML. And: it actually works properly for me.