FCKeditor Pesky ‘p’ Tags

December 18th, 2008 by Fuzz
Tagged as: , , .

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.

3 Responses to “FCKeditor Pesky ‘p’ Tags”

  1. TomInGRMI Says:

    I have had good luck with Nvu… http://net2.com/nvu/index.html

  2. Fuzz Says:

    I’ll check that out. Thanks!

  3. Fuzz Martin :: FuzzMartin.com » Blog Archive » Fck FCKeditor Says:

    [...] everything I said about FCKeditor. It’s garbage. I shouldn’t have to jump through hoops in order to get a textarea field [...]