如何在ckeditor中禁用保存按钮? [英] how can i disable save button in ckeditor?

查看:231
本文介绍了如何在ckeditor中禁用保存按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不想在ckeditor中的任何ajax功能。如何从工具栏中删除该按钮?如果我不禁用保存按钮,我得到奇怪的错误,当我单击该按钮。我按照本教程: -

I don't want any ajax functionality currently in ckeditor. How can i remove that button from toolbar? If i do not disable that save button i get strange errors when i click that button. I followed this tutorial :-

http:// docs .cksource.com / CKEditor_3.x / Developers_Guide / Integration

提前感谢:)

推荐答案

在您的配置文件中,您可以指定自己的工具栏(并省略保存按钮)。

In your config file, you can specify your own toolbar (and leave out the save button).

config:

CKEDITOR.editorConfig = function( config )
{
    // Define changes to default configuration here. For example:
    // config.language = 'fr';

    config.uiColor = '#F6F6F6';
    config.fontSize_sizes = '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;15/15px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px' ;
    config.forcePasteAsPlainText = true;
    config.format_tags = 'p;h2;h3;h4;h5;h6;pre;div'
    config.height = "400px";
    // config.protectedSource.push( //g ); // Allows PHP Code
    // config.shiftEnterMode = CKEDITOR.ENTER_BR;
    config.skin = 'kama';
    config.undoStackSize = 90;
    config.width = "98%";

    config.disableNativeSpellChecker = false;
    config.scayt_autoStartup = false;

    config.toolbarCanCollapse = false;
    config.toolbar = 'Cms';
    config.toolbar_Cms =
    [
        ['Source'],
        ['Cut','Copy','Paste','PasteText','PasteFromWord'],
        ['Undo','Redo','-','SelectAll','RemoveFormat'],
        '/',
        ['Bold','Italic','-','Subscript','Superscript'],
        ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
        ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
        ['Link','Unlink','Anchor'],
        ['Image','Table','SpecialChar'],
        '/',
        ['Styles','Format','FontSize'],
        ['TextColor'],
        ['Maximize', 'ShowBlocks']
    ];
};

这篇关于如何在ckeditor中禁用保存按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆