MACROMEDIA COLFUSION MX 7-CFML Reference page 786

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

ParagraphFormat
Description
Replaces characters in a string:
Single newline characters (CR/LF sequences) with spaces
Double newline characters with HTML paragraph tags (<p>)
Returns
A copy of the string, with characters converted.
Category
Display and formatting
Function syntax
ParagraphFormat(string)
See also
StripCR
Parameters
Parameter
string
Usage
This function is useful for displaying data entered in
Example
<h3>ParagraphFormat Example</h3>
<p>Enter 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">
<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>
786
Chapter 3: ColdFusion Functions
functions,
String functions
Description
A string or a variable that contains one
fields.
textarea

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents