我不想显示CKEditor的工具栏。
我尝试过:
HTML
<textarea id='a' name='a' ></textarea><br>
Javascript
CKEDITOR.inline( 'a', {
toolbarCanCollapse : true,
allowedContent: true
} );
但随后它也显示了工具栏。
[toolbarCanCollapse
在CKEDITOR.inline
中不起作用,请使用CKEDITOR.replace
。
[此外,toolbarCanCollapse
不会自动隐藏工具栏,它只是工具栏右下角的一个按钮,有助于切换工具栏(隐藏/显示),默认情况下会显示工具栏,并显示toolbarCanCollapse
被禁用。
尝试一下:
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.
});