Whatever message this page gives is out now! Go check it out!

ParagraphFormat

Last update:
May 18, 2026

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

Function syntax

ParagraphFormat(string)

See also

Parameters

Parameter
Description
string
A string or a variable that contains one

Usage

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

Example

<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.

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page