How do you store formatted text to be displayed!

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default How do you store formatted text to be displayed!

    Hi please can someone help.

    Im developing a dynamic website and all is well, but i want to be able to
    store all the text somehow on the database, e.g. like most nearly all dynamic
    website on the net.

    Heres a page similar:
    [url]http://www.thenetprofits.co.uk/coldfusion/faq/topic.cfm?TopicID=9[/url]

    The topic.cfm must be a template but the TopicID changes the whole formatted
    text not just a single varible (as i have previously done)

    I am a beginner incase its a really stupid question.

    Basically can i stored a premade page with formatted text and picutures and
    use coldfusion and access database to work as the template.

    How is the pages stored

    Any help would be greatly appreciated!

    Stuart

    stuart1231 Guest

  2. Similar Questions and Discussions

    1. importing formatted text
      OK... how long has this been... but i found something. You can actually use Dreamweaver to Edit your content in HTML, then use the following...
    2. Formatted text input
      My site has a very basic admin area, with text boxes in a form to add data to the database. However, I have to enter the text with all the html...
    3. Formatted text select tool gone in 6.0 pro
      Hi, What happened to the Table/Formatted Text Select Tool ???? This was available in 5.0 but gone in 6.0. Has this been replaced or simply...
    4. Paste Formatted Text
      This has been driving me crazy: I have started a database of interesting articles I have found onlne to read at a later time. A lot of the...
    5. [PHP] Formatted text from mySQL DB
      From: "PHPSpooky" <phpspooky@mjimm.com> Ah, this question again. Has it been four days already? HTML does not render new lines. Have a look at...
  3. #2

    Default Re: How do you store formatted text to be displayed!

    create the form and type in the text formatted how you want it in the textarea.
    When you submit it to the database, the database willl save how you
    formatted/entered it. It's how you display that stored text that may be a bit
    tricky.

    If you DO NOT want to maintain the formatting, you can just query the database
    and output the data like such:
    Code:
    #query.text#
    If you DO want to maintain the formatting, ColdFusion provides at least two
    options:
    Option #1
    Code:
    #ParagraphFormat(query.text)#
    Option #2
    Code:
    <cfset TextVariable = "#Replace(query.text, Chr(10), "<br />", "ALL")#">
    #TextVariable#
    Option 1 and 2 are similar, however I find option #2 better in that option #1
    is not XHTML compliant since it uses <p> tags which breaks the w3c standard.
    You'll also find that the <p> tag will also leave an unformattable gap at the
    end of the formatted text which is quite annoying. Therefore I personally
    stick with option #2 as much as possible.

    Hope this helps.

    Ultrashock Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139