繁体   English   中英

CKEditor - 没有工具栏

[英]CKEditor - No toolbars

所以我得到了一个带有CKEditor插件的textarea ,但我只是希望它干净,没有任何东西。 没有工具栏,没有状态或任何栏。 这很简单,但我无法在文档或网络上找到它!

我的CKEditor以:

$('#texto').ckeditor({skin:'office2003'});

实际上,正确的方法是删除呈现这些功能的插件:

config.removePlugins = 'toolbar,elementspath,resize';

使用新的CKEditor 4,您甚至可以在没有这些插件的情况下构建自己的编辑器,从而使编辑器代码更小: http//ckeditor.com/builder

您可以在放置源文件的目录中编辑config.js文件以指定自定义工具栏。

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.
};

有关详细信息,请参阅开发人员指南

继@wsanwille之后回答也隐藏了工具栏。

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.
});

使用CKE 4或更高版本,您可以使用以下行在本地配置您的CKE:

<script type="text/javascript">
$(document).ready(function()
{
 CKEDITOR.replace('textArea-id');
 CKEDITOR.config.toolbar = [['Bold','Italic','Underline']] ;
 CKEDITOR.config.uiColor = '#fff';
});

希望这可以帮助。

像那样? 空白方块是ckeditor。

[我的ckeditor ] 1

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM