Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keeping formatting

Status
Not open for further replies.

boyfromoz

Technical User
Feb 1, 2001
469
AU
I have a client with an access/asp driven site. Currently, they cut and paste text from a word document into a text box. This text is then uploaded into a database, and the text can then be palced anywhere within the site.

Problem is the formatting is lsot. no paragraphs no fonts etc,

Is there anyway to allow people to upload text into a database and keep relevant formatting?
 
An obvious way of doing this would be to save the selected document as a web page from within word. This creates a html file with all the formatting in place. It is then just a case of sticking it into a Memo field. When the field is retrieved you can use some ASP jiggery-pokery to display it. I haven't tried this, but it sounds feasible.

Martin
 
I've been working on a similar problem. A somewhat 'buggy' solution I've played with is this:

Allow users to paste data into the text field, just as you said in your description; when calling up the information onto a web page, surround the dynamic db info in HTML "pre" tags.

<pre> </pre>

This will cause every line break and space in the source code to display on screen, even thought there were no <br>, <p> or non-breaking space tags entered orignally.

THE DOWNSIDE: Text does not reformat or flow in the window, but has fixed line endings that are completely pre-determined at the time of data-entry.
 
Thanx for the input Guys, but neither really fixes my problem. When saving as a web page, sure, tags are there behind the scenes, but when you cut and paste into a text field, they do not appear.

The second solution is also problematic it will not work for different screen resolutions. The site I am building is for an art gallery so in needs to look smick

I'm going for a 2 step solution.

(1) Save as web page.
(2) View source.(already we are delving in the outer limits of my clients computing aptitiude) You can do it in word if its installed. Doesn't install automatically.
(3) Get my client to cut and paste from here, tags included.

Its seems to work well enough.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top