paragraphFormat

Description

Replaces characters in a string:

Categories

Related

Syntax

ParagraphFormat(string)

Attributes

AttributeDescriptionRequiredDefault
stringA string or a variable that contains one

Returns

A copy of the string, with characters converted.

Usage

This function is useful for displaying data entered in textarea fields.

Example

<h3>ParagraphFormat Example</h3> 
Enter text into this textarea, and see it returned as HTML. 
<cfif IsDefined("FORM.myTextArea")> 
    Your text area, formatted 
    <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>