rusty256's picture
Joined: 01/09/2011
Posts: 1
CKEditor - Disable the <p> & <br /> tags
Hi everyone,

I have just started working with CKEditor for a small internal database.

I have two issues:

1. When submitting a form with a CKEditor (JavaScript intergration) textarea field, HTML <p> and <br /> tags are displayed when the field data is submitted to our database. Normal Textarea fields do not do this, and are displayed "as seen". Is there any way of disabling these HTML tags?

2. This one isn't as important but I want the CKEditor to look like a regular textarea field (no toolbars are needed). Seems to be fairly difficult to me, I've looked at the CSS and it's not so simple. Any ideas?

Many thanks
codewaggle's picture
Joined: 29/06/2011
Posts: 44
Re: CKEditor - Disable the &lt;p&gt; &amp; &lt;br /&gt; tags
Hi Chris,

Item 1:
If I understand what you're saying, you mean that the <p> and <br /> tags are part of the content generated by the editor, not that you actually see <p> or <br /> displayed on the page when you view the content in the regular web page. If that's the case, take a look at this post I wrote which explains why those tags are generated and what configuration options you have:
How to configure ckeditor to not wrap content in <p> block?

Item 2:
This is the Toolbar page in the Developers Guide:
You can try creating your own empty toolbar and tell the editor to load that (not sure how it will look).

You could also try using the config.removePlugins option and see if you can remove the toolbar that way (I'm not sure if it's a core plugin that can't be removed):
config.removePlugins = 'toolbar';

To remove the bottom section that shows the path you would use:
config.removePlugins = 'elementspath';

So you could try both together:
config.removePlugins = 'toolbar,elementspath';

This page has "How To's":
The "Interface" section has some guides for working with the toolbar

This page lists all of the configuration options you can work with, it shows additional configuration settings that affect the toolbar (search for "tool" on the page): ... onfig.html

Be Well,