Thread: Wrapping text

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    6
    Rep Power
    0
    What is the best way to get plain text wrapped to a specific line width? I have a file with content-type specified to "text/plain" (it's an email message) and I'd need to wrap it to 72 characters (or whatever) per line for on-screen previewing. It's easy to cut lines after every 72nd character, but I wouldn't like to cut in the middle of the words...
    Thanks for your help!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Location
    Netherlands
    Posts
    77
    Rep Power
    15
    An easy way would be to put the text into a TEXTAREA box with fixed width or inside a TABLE with fixed width for preview purposes.

    Peter
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    6
    Rep Power
    0
    No, that's not working here. I want to have plain text file. Actually this probably isn't the only time I need a text wrapping function. If there's no solution ready, I think I must do one myself...

Similar Threads

  1. help with tables and wordwrapping
    By junkedBrian613 in forum PHP Development
    Replies: 2
    Last Post: February 15th, 2004, 05:42 PM
  2. how to keep table on top, not centered??
    By vinyl in forum HTML Programming
    Replies: 2
    Last Post: January 20th, 2004, 06:19 PM
  3. float question
    By yeah-yeah in forum HTML Programming
    Replies: 10
    Last Post: January 15th, 2004, 03:59 PM
  4. Javascript scrollbar - stuck on last bit
    By NayMyoSan in forum JavaScript Development
    Replies: 0
    Last Post: January 3rd, 2004, 12:05 PM
  5. Mouse over questions. n00b. :o
    By Not Tony Danza in forum HTML Programming
    Replies: 2
    Last Post: December 2nd, 2003, 06:28 AM

IMN logo majestic logo threadwatch logo seochat tools logo