RE: Inserting line breaks

2000-12-14 Thread Michael Thomas

Not sure if you ever solved this problem or not but Ive done similar types 
of apps that involve forcing line breaks into formatted form results from 
textarea's. Ill grab a snippet or 2.

CF_Snippet

cfset break="#code#"
!--- Replace all line breaks with br / so the message is formatted 
correctly. ---
cfset break=ReplaceNoCase(break, chr(10), "br /", "All")
!--- If users has put 5 cariage returns in a row, remove them ---
cfset break=ReplaceNoCase(break,"br /"  chr(13)  "br /"  chr(13)  
"br /"  chr(13),"","All")

/CF_Snippet

There #code# would be the value from the textarea. As Dylan Bromby suggests 
in this last email message by him, you will want to use virtual wrap 
"TEXTAREA WRAP="Virtual"".

Note that this only adds the appropriate line breaks to a message that is 
going to be inserted into a database. For email messages you probably wont 
be able to use this technique but something similar might work. Hopefully 
this lil' code snippet will get you on the right track.

HTH,
Mike



From: "Dylan Bromby" [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Subject: RE: Inserting line breaks
Date: Wed, 13 Dec 2000 09:50:36 -0800

If you're using a form to input the text that gets emailed, try using
TEXTAREA with WRAP="VIRTUAL"

-Original Message-
From: Greg Wolfinger [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 13, 2000 8:47 AM
To: CF-Talk
Subject: Inserting line breaks


Hey guys:

I have a form that sends an e-mail to someone and then displays the
information that was sent.  However, the message body just displays itself
on one line.  I was wondering if I could go through the string and after a
certain number of characters I would insert a line break.



Greg

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Inserting line breaks

2000-12-13 Thread Simon Horwith

You could try appending #chr(10)##chr(13)# at the end of each string line
inside your CFMAIL tags.

~Simon

 Simon Horwith
 Certified ColdFusion Developer
 Fig Leaf Software
 1400 16th St NW, # 220
 Washington DC 20036
 202.797.6570 (direct line)
 www.figleaf.com
 


-Original Message-
From: Greg Wolfinger [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 13, 2000 11:47 AM
To: CF-Talk
Subject: Inserting line breaks


Hey guys:

I have a form that sends an e-mail to someone and then displays the
information that was sent.  However, the message body just displays itself
on one line.  I was wondering if I could go through the string and after a
certain number of characters I would insert a line break.



Greg
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Inserting line breaks

2000-12-13 Thread Cornillon, Matthieu

Hi.  I don't know exactly how this works, but I had a similar need
yesterday.  I set up the e-mail in the CFM file with breaks where I wanted
them.  It seems to me that the text between the CFMAIL tags is treated
almost as if it is a separate text file, and the format is preserved.

If anyone has a more precise answer, I'd love to hear it as well.

Hope this helps,
Matthieu

 -Original Message-
 From: Greg Wolfinger [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 13, 2000 11:47 AM
 To: CF-Talk
 Subject: Inserting line breaks
 
 
 Hey guys:
 
 I have a form that sends an e-mail to someone and then 
 displays the information that was sent.  However, the message 
 body just displays itself on one line.  I was wondering if I 
 could go through the string and after a certain number of 
 characters I would insert a line break.
 
 
 
 Greg
 
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Inserting line breaks

2000-12-13 Thread Dylan Bromby

If you're using a form to input the text that gets emailed, try using
TEXTAREA with WRAP="VIRTUAL"

-Original Message-
From: Greg Wolfinger [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 13, 2000 8:47 AM
To: CF-Talk
Subject: Inserting line breaks


Hey guys:

I have a form that sends an e-mail to someone and then displays the
information that was sent.  However, the message body just displays itself
on one line.  I was wondering if I could go through the string and after a
certain number of characters I would insert a line break.



Greg
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists