FCKeditor Pesky ‘p’ Tags
December 18th, 2008 by FuzzTagged as: fckeditor, p tags, paragraph.
A break for some dorkiness:
When I’m creating website applications for clients, I usually use FCKeditor as a WYSIWYG (what you see is what you get) editor. The problem with it is that it constantly spits out <p> (paragraph) tags around the beginning and end of the output. For the life of me, I couldn’t figure out a way to get rid of that. Yes, you can set FCKConfig.EnterMode = ‘br’ in the config file, but that just changes how the editor responds when the user hits “enter” – it will still wrap the output with <p></p>.
My solution – php’s strip_tags(). I changed the editor to <br> mode (as shown above) and then I echo out the information as: $row(strip_tags(row['mytextcolumn'], “<a><br><b><u><i><em><strong><strike><blockquote>”)). That seems to work just fine. It’s not perfect, but it gets the job done. I would be completely in love with FCKeditor if it were possible to just turn off the <p> wrap.



December 18th, 2008 at 11:07 am
I have had good luck with Nvu… http://net2.com/nvu/index.html
December 18th, 2008 at 11:14 am
I’ll check that out. Thanks!
December 19th, 2008 at 6:52 am
[...] everything I said about FCKeditor. It’s garbage. I shouldn’t have to jump through hoops in order to get a textarea field [...]