• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
least annoying of the rich texts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

least annoying of the rich texts


  • Subject: least annoying of the rich texts
  • From: Mike Schrag <email@hidden>
  • Date: Tue, 9 Dec 2008 10:26:19 -0500

i have to say .. i tried a ton of them, and they all sucked ... The one that surprisingly sucked the least for me?  Yahoo Rich Text Editor.  I gotta say .. I was using tiny_mce before, mainly because of the extensibility and some level of "if these other people are doing it, it can't be ALL bad".  But as it turns out ... it's pretty bad.  It's comparatively really sluggish, and while it's POSSIBLE to extend, I found it to be pretty annoying to do so.  I know YUI has a bit of a reputation of being big and complicated, but they have great examples of just dropping it into your page, and it really did "just work" for me.

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
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: least annoying of the rich texts
      • From: Kieran Kelleher <email@hidden>
  • Prev by Date: [MEETING] WO-NOVA - Next TUESDAY 12/16/08
  • Next by Date: PDF generator/converter
  • Previous by thread: [MEETING] WO-NOVA - Next TUESDAY 12/16/08
  • Next by thread: Re: least annoying of the rich texts
  • Index(es):
    • Date
    • Thread