Replaces characters in a string:
A copy of the string, with characters converted.
Display and formatting functions, String functions
ParagraphFormat(string)
Parameter |
Description |
|---|---|
string |
A string or a variable that contains one |
This function is useful for displaying data entered in textarea fields.
<cfscript> myText="This is my block of text. It has both single newline characters in it like this paragraph, and double newline characters like in the next paragraph. This is the paragraph with the double newline characters." writeOutput(ParagraphFormat(myText)) </cfscript>
Output
This is my block of text. It has both single newline characters in it like this paragraph, and double newline characters like in the next paragraph.
This is the paragraph with the double newline characters.
Sign in to your account