Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

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() {
   $('#your_textarea').ckeditor({
       toolbar: 'Full',
       enterMode : CKEDITOR.ENTER_BR,
       shiftEnterMode: CKEDITOR.ENTER_BR
   });
});
</script>

 

Within the Admin - Includes - Template Top PHP file.

 

Any other suggestions to rectify this problem?

Link to comment
Share on other sites

  • 1 year later...

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

 

Regards

Joli

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

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...