CKEditor - 无工具栏

发布于 2024-12-19 09:58:04 字数 221 浏览 3 评论 0原文

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

我的 CKEditor 启动于:

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

执手闯天涯 2024-12-26 09:58:04

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

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

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

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

何以心动 2024-12-26 09:58:04

您可以编辑放置源文件的目录中的 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.
};

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

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.

小嗲 2024-12-26 09:58:04

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

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.
});
夜访吸血鬼 2024-12-26 09:58:04

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

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

希望这会有所帮助。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文