Re: nl2br problem

From: Date: Tue, 01 Feb 2011 19:50:00 +0000
Subject: Re: nl2br problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-311121@lists.php.net to get a copy of this message
On Tue, Feb 1, 2011 at 14:42, Donovan Brooke <lists@euca.us> wrote: > Hello, > > I have CMS form that allows HTML for the body of a site. > > To keep the form somewhat WYSIWYG, I am using the > nl2br() function for displaying: > > nl2br($t_body) > > This works great for normal stuff.. but for pages with tables > etc.. it creates a lot of extra "<br />'s" :-). [snip!] > > Any thoughts? Absolutely. Look into employing TinyMCE or CKEditor (or the older FCKEditor) so you don't have to do so much server-side processing. This will only apply to pages moving forward, mind you, not for displaying existing table data. You'll need to make the determination if it's right for your specific case. -- </Daniel P. Brown> Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/

« previous php.general (#311121) next »