This content has been marked as final. Show 3 replies
> How to display the formatted text from access memo field using coldfusion without loosing the formating of the text
How is the text formated?
If the memo field contains HTML markup such as <h1>Hello World!</h1>,
then all you need to do is <cfoutput>#query.memoField#</cfoutput>
If it contains some other type of markup or the markup is escaped, then
other process will need to be used. But we will need to know exactly
how the data is stored in the database.
You can use the <pre></pre> HTML tags to maintain line breaks and spacing (though you'll probably want to do some stylesheet work with that tag because the default style is pretty ugly). On the otherhand if all you are interested in is line breaks, you can do the following:
<cfset sFormattedString = Replace(myString, "#chr(13)##chr(10)#", "<br>", "all")>
chr(13) and chr(10) are the ASCII character codes for line break and line feed (respectively).
double post (original in General Discussion forum)