Miscellaneous
simpleFormat()
Signature
Section titled “Signature”simpleFormat() — returns any
Description
Section titled “Description”Replaces single newline characters with HTML break tags and double newline characters with HTML paragraph tags (properly closed to comply with XHTML standards).
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | yes | — | The text to format. |
wrap | boolean | yes | true | Set to true to wrap the result in a paragraph. |
Examples
Section titled “Examples”<!--- How most of your calls will look --->
#simpleFormat(post.bodyText)#
<!--- Demonstrates what output looks like with specific data --->
<cfsavecontent variable="comment">
I love this post!
Here''s why:
* Short
* Succinct
* Awesome
</cfsavecontent>
#simpleFormat(comment)#
-> <p>I love this post!</p>
<p>
Here''s why:<br />
* Short<br />
* Succinct<br />
* Awesome
</p>