My CKEditor instance has a header that I am trying to remove.
I have looked at all the attributes here but not seeing anything promising. Anyone know how to do this? CKEditor seems very customizable. I would be surprised if there is no way to do this.
There are a couple of options to remove the top toolbar:
removePlugins
option and remove the toolbar.Example:
CKEDITOR.replace( 'editorId', {
removePlugins: 'toolbar'
} );
Check this JsFiddle Example.
In version 5, you need to pass the array of plugins to removePlugins
.
ClassicEditor.create(
document.querySelector( '#cke5-classic-demo' ),
{
removePlugins: ['toolbar'],
...
} )
In CKEditor5, you can set the toolbar
option to false and remove the top toolbar.
In CKEditor5, if you want more control, you can use the Decoupled editor. This lets you render the toolbar and the editor area separately. So you can only render the editor area and hide the toolbar. Check this Headless editor example, where the toolbar and editor area are separated. In this case you can hide the toolbar and only render the editor.
If you still have an extra border at the top, you can use the below css to remove the border:
.ck.ck-sticky-panel__content {
border: 0 !important;
}