Reputation: 43
I don't want to show the toolbar of CKEditor.
I tried:
HTML
<textarea id='a' name='a' ></textarea><br>
Javascript
CKEDITOR.inline( 'a', {
toolbarCanCollapse : true,
allowedContent: true
} );
But then also it is showing the toolbar.
Upvotes: 1
Views: 2220
Reputation: 1387
toolbarCanCollapse
will not work in CKEDITOR.inline
, use CKEDITOR.replace
.
Also, toolbarCanCollapse
will not hide the toolbar automatically, it is just a button at the bottom-right corner in the toolbar, which helps to toggle the toolbar (Hide/Show), by default toolbar is shown and toolbarCanCollapse
is disabled.
Try this:
CKEDITOR.replace('a', {
toolbarCanCollapse: true, //Button to toggle toolbar (show/hide)
toolbarStartupExpanded: false, //This will hide toolbar by default.
height: "60px" //I just gave the height if you want textarea to be small, just like it is in CKEDITOR.inline.
});
Upvotes: 2