Diff.cfc - A ColdFusion text diff component

    Posted At : November 3, 2005 4:52 PM

A couple of weeks ago I was playing with Sean Corfield's MachWiki. It was really cool to go through the code (I always enjoy Sean's code).

I eventually decided to use MediaWiki for my company's standards wiki. I had to dig back, way back, for my php skills and managed to get it up and running with mods and all.

Of course I really wanted to rewrite the thing in ColdFusion, so I started from what seemed like an interesting part - the diff tool.


<cfobject component="diff" name="cfcDiff">
<cfoutput>#cfcDiff.diffFormat(form.txt1,form.txt2)#</cfoutput>


# line # line
<html>   <html> 
<head><title>Text 2 </title></head> <head><title>Text 1 </title></head>
<body>   <body> 
Hello, my name is Shlomy Gantz, how are you doing? Hello, my name is Inigo Montoya ,You killed my father.
<font color="#FF0000"> This text is in red </font> <font color="#00FF00"> This text is in green </font>
I have more lines   
I have more lines   
</body>  </body> 
</html>  </html> 

You can download diff.cfc (beta) at http://www.shlomygantz.com/customtags/diff_cfc/diff_readme.cfm

Little did I know that Raymond Camden was about to release his Wiki called Canvas as part of DRK 13.

Comments
Powered by BlogCFC

HostMySite.com Web Hosting Provided by www.HostMySite.com

Aggregated by fullasagoog.com
[Valid RSS]

Add to Google