Page 1 of 1

Outer newlines get removed in preview

Posted: Fri Jul 24, 2009 11:17 am
by WebComPas
Hallo!

Sometime I place a newline at the beginning or at the end of an entry for using nl2br-Plugin. When I click on "Preview" the nl2br-Plugin works corretly, but in the textarea field the newline has been cut off. If the newline is somewhere within the text this doesn't happen.

I hope, this will be fixed soon.

Regards,
Pascal

Re: Outer newlines get removed in preview

Posted: Sat Jul 25, 2009 11:11 am
by onli
If you write a new entry and end it normally, if often happens that there is one newline accidentally remaining, so removing those br sound reasonable to me. nl2br probably shouldn't be used to extend the distance between blog-entry and boundaries, CSS is the better tool for that job.

But maybe this effect is really not intended and therefore a bug?
sincerely

Re: Outer newlines get removed in preview

Posted: Sat Jul 25, 2009 7:42 pm
by garvinhicking
Hi!

s9y applies a "trim" when displaying the textarea, that is required to prevend trailing or appending newslines, as these often cause more trouble; IMHO those should not be needed to be placed by a user.

If you want to force it, make it a "<!--blank-->[RETURN]", then the HTML comment will not trigger the trimming of spaces at the beginning.

HTH.
Garvin