formatting question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
soshea
Forum Commoner
Posts: 31
Joined: Tue Nov 12, 2002 11:22 pm
Location: Idaho
Contact:

formatting question

Post by soshea »

hey,
i am utilizing a <textarea> tag to input data into a text type column in a DB. this is so that people can cut and paste documents. my problem is that when i utilize a
<pre>

Code: Select all

<?=$data[document]?>
</pre>
if they did not use a carriage return when typing or cutting and pasting, then the lines will continue to the right forever even when i utilize the width attribute for the pre tag. if i just have the data show up in another textarea tag for viewing it looks great!!!
any suggustions on how to format this so that it does not run on but actually wraps the text in the appropriate area???!?
thanx for any help
soshea
User avatar
uberpolak
Forum Contributor
Posts: 261
Joined: Thu Jan 02, 2003 10:37 am
Location: Next to the bar

Post by uberpolak »

Have you tried putting WRAP="virtual" in your <TEXTAREA> tag? I wasn't quite sure by your question but it sounded like that might help.

eg:

<TEXTAREA WRAP="virtual"></TEXTAREA>
User avatar
soshea
Forum Commoner
Posts: 31
Joined: Tue Nov 12, 2002 11:22 pm
Location: Idaho
Contact:

Post by soshea »

ahhh, good point. completely forgot about the virtual. will giver it a try!!
thanx
soshea
User avatar
soshea
Forum Commoner
Posts: 31
Joined: Tue Nov 12, 2002 11:22 pm
Location: Idaho
Contact:

Post by soshea »

just wanted to followup with what i utilized incase other people had the same problem.

i used the WRAP="hard". this made the formatting go from one long string (if the user did not create the returns them selves) to inserting the wrapping needed.

your suggestion kick started the process, thanx
soshea
Post Reply