2 Replies Latest reply on Nov 12, 2007 8:24 PM by Kaplanconstruct

    page break after specific legth

      My users are entering responses into to a textarea which is submitted to my database. Then I'm displaying the text using CFPROCESSINGDIRECTIVE suppresswhitespace="no" so the white space is displayed. But now its expanding my table too far when people don't use a return.

      Is there a way to put a return in a sentence after a specified length? which would be the length of my table width.

      I'm trying to preserve the spacing the user inputs but restrict the sentence length with out a return.

      Any help is greatly appreciated
        • 1. Re: page break after specific legth
          Level 7
          preserverwhitespace="no" should have no effect on preserving user's
          linebreaks n a text area input.
          i am pretty sure that what you are seeing is not the result of users not
          using "return" key in their inputs, but a result of you not formatting
          the output of their input correctly.

          while, to answer your specific question, there are ways to insert html
          linebreaks (<br> tags) in the user's input text at display time (using
          regexp and loops), i would suggest first trying more common techniques
          like using
          or even just
          (with a bit of css formatting to make it look nice)


          Azadi Saryev
          • 2. Re: page break after specific legth
            Kaplanconstruct Level 1
            Perfect! thank you my head hurts I've been coding too long. Paragraphformat solved my issue. Now I will polish it off with some css, thanks!!