Silly Coldfusion trick for generating iMacros

0 replies
I integrate iMacros into lots of stuff for members but found creating formatted text with no whitespace but correct <BR> and <SP> tags to be a pain in the...

So I tried to find an easy method but couldn't.

Thought I would post just in case some CF dude needed it:

<cfset adbody = "#yourquery.normaltextstuff#">
<cfset adbody1 = Replace(adbody, "#chr(13)#","<br>", "ALL")>
<cfset adbodyfinal = Replace(adbody1, " ","<SP>", "ALL")>
<cfset adbodyfinal2 = "#paragraphformat(adbodyfinal)#">
<cfset adbodyfinal3 = Replace(adbodyfinal2, " ","", "ALL")>
<cfset adbodyfinal4 = Replace(adbodyfinal3, "<P>","", "ALL")>

It returns a single line with correct tags for using in an iMacro text file.

Weird but works for any text.
#coldfusion #generating #imacros #silly #trick

Trending Topics