Textile for ColdFusion

February 13, 2006
coldfusion

A few weeks ago I mentioned that I had an open source project in the pipeline. Well I've been really busy so I haven't had a chance to release it until now...

I built a UDF for converting textile markup into HTML markup.

You can learn more about textile here. My UDF doesn't support all the features of textile yet, but it does have quite a few of them.

Download the ColdFusion UDF for Textile.

BTW you should see this in some upcoming projects from foundeo.



Related Entries

2 people found this page useful, what do you think?

Comments

Textpattern, which powers The Tuna Ranch has textile support, and it's quite nice, but I still prefer markdown.
Thank you, thank you. Textile and markdown support are long overdue for CF. You are a god.
Great stuff Pete - this is something I'd been looking for for ages, and was on the verge of trying to write it myself...
Pete - I sent some updates via your form to fix some bugs in the UDF. Right now the regexps for bolding, striking and so forth don't do enough checking to prevent mistakes from popping up. Like if you have more than one word bolded in a line it bolds from start * to end *. My fixes should correct that for you. Thanks for the work, I integrated it into Ray's Galleon 1.5 forum package and both things into my application and it's looking good!
After looking at ways to improve on this, I realised how complex the original Textile parser is! And so I came up with a way to save me some time... Seeing as I've got PHP installed on my web server to run forums, I've created a UDF which uses CFHTTP to run the source text through the PHP parser, and return it. I've also tweaked it to give the option of HTML or XHTML output... The advantages are (1) it is the official release of Textile, so should be pretty much correct! and (2) if they update Textile, I can just drop in the revised PHP page and it's up to date. Pete - I do however wish you every success in developing the CF version...
As well as Textile, I'd also been waiting for someone to port Markdown to ColdFusion - until I realised that someone had already done nearly all the work! So, I have taken MarkdownJ - a perfect Java port of Markdown - and turned it into CFX_Markdown, a Java-based CFX tag. I have today released it into the wild - if any of you are interested in trying it out, you can get it from my website: http://sebduggan.com/CFX_Markdown/
Hi Peter, we are all delighted with this UDf - kudos. However as Brian says, I think they are a few tiny mistakes. For example I had: "levels have inter-linkage and a search option is provided on all pages.. ..for improvements / add-ons" and it STRIKEd-out everything from "inter" to "/ add". Can you release Brian's updated version?
Thanks so much for building this component, Pete! I found a bug, though! The check to see whether you should end an unordered list doesn't trim the next line in the input before checking its length (which you do in the same check for the ordered list handler); this causes the list never to end because even a blank line has a carriage return on it. This is the original: <cfif index+1 GT lines OR NOT len(lineArray[index+1])> And my fix: <cfif index+1 GT lines OR NOT len(trim(lineArray[index+1]))> Works brilliantly, cheers!
I realize that you posted this years ago but I noticed a bug(?). I've only used the demo so it may be a problem with that instead of the UDF.

If you do a single item list, anything after that list disappears.

Here is the text I used
"
* There should be two blank lines after a list, even if there is nothing after it!


However, this one has something after it!
"
I realize that you posted this years ago but I noticed a bug(?). I've only used the demo so it may be a problem with that instead of the UDF.

If you do a single item list, anything after that list disappears.

Here is the text I used
"
* There should be two blank lines after a list, even if there is nothing after it!


However, this one has something after it!
"

Post a Comment




  



Spell Checker by Foundeo

Recent Entries



foundeo


did you hack my cf?