Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.


CKEditor Automatically Putting <p> in Product Description

Recommended Posts

I installed CKEditor and noticed it was adding <p>'s all over my product descriptions when I went into Source.


I would rather have it do <br> or <br /> instead.


I found code here: http://stackoverflow.com/questions/1977791/turn-off-enclosing-p-tags-in-ckeditor-3-0


And placed the code


<script type="text/javascript" src="/js/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/js/ckeditor/adapters/jquery.js"></script>
<script type="text/javascript">
$(function() {
       toolbar: 'Full',
       enterMode : CKEDITOR.ENTER_BR,
       shiftEnterMode: CKEDITOR.ENTER_BR


Within the Admin - Includes - Template Top PHP file.


Any other suggestions to rectify this problem?

Share this post

Link to post
Share on other sites

A carriage return (Enter key) is a new paragraph <p>. A line break (Shift Enter) is a <br>.


So what are you saying is happening?


Projects Director @ ozEworks.com

Share this post

Link to post
Share on other sites

Hi Matt,

If I understand correctly ...

You should actually be doing your changes inside ckeditor files and not the oscommerce files



The ckdeitor/config.js


although if you read down the link you sent I think I would prefer doing this in the ckeditor.js


a bit hard to find you would need to do a search.ckeditor.js line #91




To improve is to change; to be perfect is to change often.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now