I wish it didn’t use Prototype.js, but this little textarea toolbar is exactly what I’ve been wanting: it spits out Markdown, Textile, or bbCode and has a live preview. Perfect for the little custom CMSes I’ve been making in Django for small sites like Trio Hair (which are almost always based around Markdown).

Visit site:

http://livepipe.net/projects/control_textarea/

Comments

  1. 001 // Baxter // 05.11.2007 // 2:08 PM

    Why do you wish it wasn’t based on prototype? I thought you liked prototype.

  2. 002 // Jeff Croft // 05.11.2007 // 2:12 PM

    Prototype is alright — I use it here. But, it’s definitely not ideal in my mind. It doesn’t always play nice with other JavaScript libraries and it just generally feels too much like I’m writing Prototype code and not writing JavaScript when I use it. It’s a little too much for me.

    The reason I wish this wasn’t based on Prototype is that I’m afraid when I plug it into my Django admin it might not play nice with the JavScript that’s already there (not sure, haven’t tried it yet).

    My preferred JS library these days is definitely YUI — though I have never taken the time to transition this site to it (I’ll do that whenever I redesign next). :)

  3. 003 // sandro // 05.11.2007 // 9:41 PM

    Have you seen showdown? I actually thought I found showdown via your site, maybe it was Shaun Inman. Anyway, John Fraser implemented markdown via javascript and called it showdown, livepipe is using his port. I’ve had some experience implementing markdown live preview with showdown. Much like any other markdown port, you send your text as an argument, and you get html.

    converter = new Showdown.converter();
    text = converter.makeHtml(text);
    

    With his port, you’re able to use whatever dom manipulation you’d like to make the magic happen.

  4. 004 // Jeff Croft // 05.12.2007 // 1:03 AM

    Yeah, showdown is really cool, too. But this is a bit different — this gives you a tool bar for bold, italic, links, lists, etc. over your textarea fields. It also does the live preview thing, but what I’m interested in is the toolbar. :)

  5. 005 // Baxter // 05.14.2007 // 3:56 PM

    For whatever it’s worth, I’ve been using and liking jQuery. Lightweight and gets the job done. I can’t remember why, but YUI rubbed me the wrong way.

    Anyway, I don’t think the toolbar part of that would really be all that difficult to do in jQuery or YUI (or any of the better toolkits). I’m about 75% of the way there, without even trying.

Post your comment