There are few rich text editors that depend on 'contenteditable' attribute of HTML5 to provide rich text editing. Author of codemirror describes his experience with writing 'contenteditable' based code editor, and why he switched away from it. If support for 'contenteditable' is so buggy in desktop browsers, think about support for it in tablet/mobile browsers !!.
On the other hand, there are open source rich text editors built with web technologies that didn't depend on 'contenteditable' attribute of HTML5. Instead they depend on their own layout engine. Here are two opensource rich text editors that have their own layout engine,
Carota : HTML 5 Canvas based rich text editor.
Demo is accessible at http://earwicker.com/carota/
Source is accessible at https://github.com/danielearwicker/carota
Firepad : Codemirror based rich text editor from Firebase.
Demo is accessible at http://www.firepad.io/
Source is accessible at https://github.com/firebase/firepad