Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

CKEditor Automatically Putting <p> in Product Description


  • You cannot reply to this topic
No replies to this topic

#1 mvanderhoff

  • Community Member
  • 43 posts
  • Real Name:Matt

Posted 14 May 2012, 17:07

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?