Page 1 of 1

Nl2br , modify for always normal paragraph display

Posted: Thu Sep 24, 2009 7:57 am
by uyewq
while using nl2br, if user submit ENTER button (while writing comment) 3 or more times lots of gaps appears between paragraphs

is it possible to modify these gaps?

if user submit ENTER once => create one more empty line and make second paragraph

if user submit ENTER twice => ok, it is as it should be.(so do nothing)

if user submit ENTER three times or MORE => crop ( n - 2) times empty lines so make a normal paragraph

if this is possible, how ?