CKEditor - No toolbars

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 02:56:25

问题


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.

]1

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!