3 Replies Latest reply on Apr 11, 2007 2:03 PM by insuractive

    display formating text

    user341975
      How to display the formatted text from access memo field using coldfusion without loosing the formating of the text
        • 1. Re: display formating text
          Level 7
          user341975 wrote:
          > 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.
          • 2. Re: display formating text
            insuractive Level 3
            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).
            • 3. Re: display formating text
              insuractive Level 3
              double post (original in General Discussion forum)