magpiebrain

Sam Newman's site, a Consultant at ThoughtWorks

Thanks to some code from “Stuart Langridge”:http://www.kryogenix.org, I’ve managed to implement a live comment system supporting “Textile”:http://textism.com/tools/textile/. Originally inspired by “Jon Hick’s”:http://www.hicksdesign.co.uk/journal/ comment system, as you type comment the text is parsed and formatted as HTML, and inserted into another div. The Javascript doesn’t support all Textile formatting, but supports all of the quick tags (apart from Span) and some of the block formatting (such as blockquotes). I may add support for more of Textile’s formatting commands later – I’ll see how much people use it. Anyway, feel free to give it a go and “let me know(Contact Me)”:http://www.magpiebrain.com/contact if you experience any problems.

11 Responses to “Live textile comment previews”

  1. sil

    I’m afraid it’s not working in Firefox: there’s a “reloadPreviewDiv is not defined” error…

    Reply
  2. Sam Newman

    Try a shift-reload – I rebuilt the javascript file I included after I rebuilt my blog, so you might have the wrong version cached.

    Reply
  3. sil

    ah-ha! That makes sense. And fixes the problem. Duh 🙂
    Gotta love Textile. Although it does pass HTML through; I’ll assume (without testing) that your back end kills bad HTML 🙂

    Reply
  4. Sam Newman

    Yep – the backend excludes html, even if the comment-preview doesn’t. Oh well, you can’t have everything…

    Reply
  5. e-null

    Hi,

    Your article on SimpleDateFormat really open my eyes. I think I will switch to jakarta’s commons Date Formatters from now on.

    I want to comment on something,I am not trying to insult on anything but this really caught my attention. Currently I am using IE on XP. And I notice that some of your pages get elongated. For example in this page, there is a huge gap between the last comment and the Post A Comment header.

    Reply
  6. Sam Newman

    Yep – its a very annoying float bug somewhere. I’m trying to track it down, but have been sidetracked by any number of other things! In anycase I hope to have a site redesign done in the next couple of months, so it might sort itself out.

    Reply
  7. Jeff Minard

    Sweetness – I’m going to use this on my own site 😀 Heck, might even include it on my admin system for posting entries.

    “creatimation.net(my website)”:http://www.creatimation.net/

    *Mucha’s gracias!* -err, that ! throws of the JS regex it seems

    Reply
  8. sosa

    *Thank you very much* this is what i was looking for.
    I will use this in my site if you don’t care.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Basic HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS

%d bloggers like this: