Ask a Question related to Coldfusion Database Access, Design and Development.
-
stuart1231 #1
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
-
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... -
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... -
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... -
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... -
[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... -
Ultrashock #2
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:
If you DO want to maintain the formatting, ColdFusion provides at least twoCode:#query.text#
options:
Option #1
Option #2Code:#ParagraphFormat(query.text)#
Option 1 and 2 are similar, however I find option #2 better in that option #1Code:<cfset TextVariable = "#Replace(query.text, Chr(10), "<br />", "ALL")#"> #TextVariable#
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



Reply With Quote

