Rich Text Formatting

Results 1 to 2 of 2

Thread: Rich Text Formatting

  1. #1
    Join Date
    Dec 1969

    Default Rich Text Formatting

    I&#039;m trying to figure out how to save rich-formatted text in a SQL database. One of the goals is to be able to keep formatting such as bolding and italicizing. <BR><BR>Another option that would work is possibly creating a text box with some control buttons that allow you to hilight a word and then click on a B button and bold the word and then save all of this to a database as HTML code.

  2. #2
    Join Date
    Dec 1969

    Default RE: Rich Text Formatting

    If you want a RTF textarea search Google, you&#039;ll find some info. <BR><BR>To save the HTML code in a database you have to store the formatting items with it. So if you want to display a word bold, just store<BR><BR>&#060;B&#062;The Word&#060;/B&#062; in the db. When you write the value from the db, the browser recognizes the tags and displays the words in bold. <BR><BR>When you want to preserve linebreaks from a textarea, you need to replace the VBS linebreak VbCrLF with it&#039;s HTML equivalent &#060;BR/&#062;, like this:<BR><BR>Response.Write REPLACE(TheDBText,vbCrLf,"&#060;BR/&#062;")

Posting Permissions

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