Reputation: 271604
I'm following the tutorial of CKEditor, and I did this:
$( '#editor' ).ckeditor(function(){}); //great works!!
But now...when I submit the form...I see that by default, the textarea has <p></p>
. How do I make it "nothing" by default?
Upvotes: 1
Views: 215
Reputation: 4372
I am using this
CKEDITOR.instances.MainContent_notificationText.setData( '' );
for my non-jQuery plugin version and it works great.
For your jQuery plugin you could use
$('#editor').ckeditor(function(){
this.setData("");
});
Upvotes: 1
Reputation: 1038710
Try setting the following config values:
CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR;
CKEDITOR.config.shiftEnterMode = CKEDITOR.ENTER_P;
Make sure that you clear your browser cache when you modify them as changes might not be picked up automatically.
Upvotes: 3