Live textile comment previews

Thanks to some code from Stuart Langridge, I’ve managed to implement a live comment system supporting Textile. Originally inspired by Jon Hick’s 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 if you experience any problems.

This entry was posted on Tuesday, May 18th, 2004 at 1:32 pm and is filed under Blogging. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

11 Responses to “Live textile comment previews”

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

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

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 :)

Yep – well, I hope it does, better check…

hello!

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

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.

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.

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

creatimation.net

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

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

Con ustedes… los comentarios

Algunos truquitos que acabo de implementar a los comentarios de este sitio

Sosa, go right ahead and use this if you want :-)

Have your say





Fields in bold are required. Email addresses are never published or distributed.

Some HTML code is allowed:

URIs must be fully qualified (eg: http://www.domainname.com) and all tags must be properly closed.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.