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