Reputation: 7412
I can configure a really simple inline CKEditor instance and add the CKEDITOR.ENTER_BR in the config. But it doesn't work, the editor still breaks with <p>
elements. Why?
CKEDITOR.inline(el.get(0),
{
enterMode: CKEDITOR.ENTER_BR
});
https://jsfiddle.net/adrianrosca/8xykrxwu/
Upvotes: 0
Views: 1336
Reputation: 360
Probably the editor is created by auto-inline feature of CKEditor, which can be disabled:
CKEDITOR.disableAutoinline = true;
If you don't disable that option, your calls to CKEDITOR.inline
won't work, because the editor is already created.
You can also use editor.setActiveEnterMode
to change editor's current behavior for the Enter key.
You should also note that CKEDITOR.ENTER_BR
mode is NOT recommended. If you do it to control paragraph spacing, you should use stylesheets instead.
Upvotes: 0