I've only just started with some little javascript experiments, so it's not like any code has been written yet.
You can look at http://bitfluxeditor.org/ for a start.
* support for both Mozilla and IE is important.That's going to give one or two headaches more :-)
J.Pietschmann