YUI won't let me load its resources from the yahoo site with on-demand ajax loading (i think because of cross-site issues, but I haven't looked closely yet), so you might have to host them locally, but if people care, roughly the chunk I use to do rich text with YUI is:
$(document.body).addClassName('yui-skin-sam');
var myEditor = new YAHOO.widget.Editor('<wo:str value="$^id"/>', {});
myEditor.on("windowCreateLinkRender", function(e) { e.panel.cfg.setProperty("zIndex", 10001) });
myEditor.on("windowInsertImageRender", function(e) { e.panel.cfg.setProperty("zIndex", 10001) });
myEditor.render();
var saveOnSubmit = function() {
myEditor.saveHTML();
$('<wo:str value="$^id"/>').form.stopObserving('ajax:submit', arguments.callee);
};
$('<wo:str value="$^id"/>').form.observe('ajax:submit', saveOnSubmit);
(The weird zIndex stuff is so you can put a YUI in an AjaxModalDialog, which sits at 10000). Note that ajax:submit thing is something special we do in Wonder, so if you're doing your own Ajax stuff, you'll have to figure out an equivalent -- that basically makes the myeditor commit its html to the textfield before submitting through ajax.
Maybe I'll move this component into the YUI framework, but some of the hoops I jumped through for adding script resources reliably are a little bit weird, so I figured I'd just share the important part in the meantime.
ms