• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

page break after specific legth

Explorer ,
Nov 12, 2007 Nov 12, 2007

Copy link to clipboard

Copied

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
TOPICS
Advanced techniques

Views

268

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 12, 2007 Nov 12, 2007
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 ...

Votes

Translate

Translate
LEGEND ,
Nov 12, 2007 Nov 12, 2007

Copy link to clipboard

Copied

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
#paragraphformat(yourtext)#
or even just
<pre>#yourtext#</pre>
(with a bit of css formatting to make it look nice)

hth


---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 12, 2007 Nov 12, 2007

Copy link to clipboard

Copied

LATEST
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!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation