474
CFML Language Reference
ParagraphFormat
Returns string with converted single newline characters (CR/LF sequences) into
spaces and double newline characters into HTML paragraph markers (<P>).
See also
StripCR
.
Syntax
ParagraphFormat
(
string)
string
String being converted to the HTML paragraph format.
Usage
ParagraphFormat is useful for displaying data entered into TEXTAREA fields.
Example
<!--- This shows ParagraphFormat --->
<HTML>
<HEAD>
<TITLE>
ParagraphFormat Example
</TITLE>
</HEAD>
<BODY BGCOLOR=silver>
<H3>ParagraphFormat Example</H3>
<P>Enter some text into this textarea, and
see it returned as HTML.
<CFIF IsDefined("FORM.myTextArea")>
<P>Your text area, formatted
<P><CFOUTPUT>#ParagraphFormat(FORM.myTextArea)#</CFOUTPUT>
</CFIF>
<!--- use #Chr(10)##Chr(13)# to simulate a line feed/carriage
return combination; i.e, a return --->
<FORM ACTION="paragraphformat.cfm" METHOD="POST">
<textArea NAME="MyTextArea" cols="35" ROWS=8>
This is sample text and you see how it
scrolls<CFOUTPUT>#Chr(10)##Chr(13)#</CFOUTPUT>
From one line <CFOUTPUT>#Chr(10)##Chr(13)##Chr(10)##Chr(13)#</CFOUTPUT>
to the next
</textArea>
<INPUT TYPE="Submit" NAME="Show me the HTML version">
</FORM>
</BODY>
</HTML>
Summary of Contents for COLDFUSION 4.5-CFML LANGUAGE
Page 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Page 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Page 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Page 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Page 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Page 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Page 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Page 584: ...560 CFMLLanguageReference...
Page 594: ...570 CFMLLanguageReference...