Gossamer Forum
Home : Products : DBMan : Customization :

Displaying spaces in textarea

Quote Reply
Displaying spaces in textarea
Some time back I had posted about being able to show line breaks in textareas so that records entered would look the same when you viewed them, the solution ended up being this:

$rec{'fieldname'} =~ s/\n/<BR>/g;

placed at the top of the sub html_record.
However, I'd also like to have something show the spaces as well so that indents etc show up correctly. I tried this:

=~ s/\s/&nbsp;/g;

But that ended up stripping out extra spaces and you'd end up seeing one loooooooong string of text.

Any ideas what that should be? I tried doing a google and wasn't able to find what I needed.
Thanks!
Subject Author Views Date
Thread Displaying spaces in textarea shann123 2979 Mar 4, 2005, 11:03 PM
Thread Re: [shann123] Displaying spaces in textarea
LoisC 2874 Mar 9, 2005, 9:26 AM
Thread Re: [LoisC] Displaying spaces in textarea
shann123 2859 Mar 9, 2005, 2:33 PM
Post Re: [shann123] Displaying spaces in textarea
JPDeni 2835 Mar 14, 2005, 11:39 PM
Post Re: [shann123] Displaying spaces in textarea
Watts 2840 Mar 11, 2005, 9:46 AM