Really speaking most todays RTE implementations are very easy, all you need to do is to use designMode property, and provide some means change text style, that becames like one line event handlers.
Kevin Roth has a very nice element
http://www.kevinroth.com/rte/demo.htm Script for this element is very simple, look at it to learn how it works. It is much easier that it sounds
This element requires ieSpell to do spellcheck, but you can change it to use Yahoo webservices or you own serverside implementation.
Another way to implement RTE is hard and unconvinient, but compatible with lots of old browser. I have not seen any "production ready" implementations, but you can look at the idea at
http://www.webreference.com/programming/javascript/gr/column11/index.html http://www.webreference.com/programming/javascript/gr/column12/index.html