Most frameworks even have plug-in versions of it so you don't need to do very much to communicate with it. For example, our framework NOLOH has a CKEditor Nodule (NOLOH Module).
You can see a live example of that here: http://www.noloh.com/NOLOH/Nodules/CKEditor/Example/, and the source for the example here: http://github.com/noloh/CKEditor/blob/master/Example/index.p...
Disclaimer: I'm a co-founder of NOLOH
TinyMCE: http://tinymce.moxiecode.com/
Quite a nice WYSIWYG 'web-control' editor that I've used on a number of admin sites for my clients.
They have a jquery version out now too that makes it a bit cleaner to integrate if you've already got jquery going (you can always run the regular, non-jquery version as well).
Cross browser open licensed elegant wysiwyg is very weak. Goog has recently rewritten docs...I assume that wysiwyg (layout engine) had much to do with that.
That being said, we get by with tinymce on most modern browsers (safari is a major pain). It has a pretty good API.
For reference, that's a main part of our major product (servee.com) so I've dine a fair amount of research
If you are asking for a good text editor, I like Notepad++ and SciTe is not at all bad. If you want say a WYSIWYG editor for LaTeX, look at Lyx. If you want something else, could you specify?