问题
So I got a textarea
with CKEditor
plugin but I just want it clean, without anything. No toolbars and no status or whatever bar. It´s simple but I can´t find it on docs or web!
My CKEditor
is started with:
$('#texto').ckeditor({skin:'office2003'});
回答1:
You can edit the config.js
file in the directory where you put the source files to specify custom toolbars.
CKEDITOR.editorConfig = function( config )
{
config.toolbar = 'Custom'; //makes all editors use this toolbar
config.toolbar_Custom = []; //define an empty array or whatever buttons you want.
};
See the developer's guide for more info.
回答2:
Actually, the right way for it is simply removing the plugins that render these features:
config.removePlugins = 'toolbar,elementspath,resize';
With the new CKEditor 4, you may even build your own editor without these plugins, making your the editor code smaller: http://ckeditor.com/builder
回答3:
Following on from @wsanwille answer to also hide the toolbar.
CKEDITOR.replace('description', {
toolbar: 'Custom', //makes all editors use this toolbar
toolbarStartupExpanded : false,
toolbarCanCollapse : false,
toolbar_Custom: [] //define an empty array or whatever buttons you want.
});
回答4:
With CKE 4 or newer, you can use below lines to config your CKE locally:
<script type="text/javascript">
$(document).ready(function()
{
CKEDITOR.replace('textArea-id');
CKEDITOR.config.toolbar = [['Bold','Italic','Underline']] ;
CKEDITOR.config.uiColor = '#fff';
});
Hope this helps.
回答5:
Like that? The blank square is ckeditor.

来源:https://stackoverflow.com/questions/8344567/ckeditor-no-toolbars