【问题标题】:how to hide all the toolbar of a ckeditor in c#如何在c#中隐藏ckeditor的所有工具栏
【发布时间】:2016-12-23 08:14:30
【问题描述】:

这是页面顶部的组件:

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

这是:

   <CKEditor:CKEditorControl ID="CKEditor1" BasePath="/ckeditor/" runat="server" EditingBlock="true" toolbar="emptyToolbar" ></CKEditor:CKEditorControl>

这里是 config.js:

CKEDITOR.editorConfig = function (config) {
    // Define changes to default configuration here.
    // For complete reference see:
    // http://docs.ckeditor.com/#!/api/CKEDITOR.config

    // The toolbar groups arrangement, optimized for a single toolbar row.
    config.toolbarGroups = [
        { name: 'document', groups: ['mode', 'document', 'doctools'] },
        { name: 'clipboard', groups: ['clipboard', 'undo'] },
        { name: 'editing', groups: ['find', 'selection', 'spellchecker'] },
        { name: 'forms' },
        { name: 'basicstyles', groups: ['basicstyles', 'cleanup'] },
        { name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align', 'bidi'] },
        { name: 'links' },
        { name: 'insert' },
        { name: 'styles' },
        { name: 'colors' },
        { name: 'tools' },
        { name: 'others' },
        { name: 'about' }
    ];

    // The default plugins included in the basic setup define some buttons that
    // are not needed in a basic editor. They are removed here.
    config.removeButtons = 'Cut,Copy,Paste,Undo,Redo,Anchor,Underline,Strike,Subscript,Superscript';

    // Dialog windows are also simplified.
    config.removeDialogTabs = 'link:advanced';



};

我该怎么办??

如何禁用所有工具栏? 如何隐藏 ckeditor 的所有工具栏。我只想要 ck 编辑器的 textarea。

【问题讨论】:

    标签: javascript c# ckeditor


    【解决方案1】:

    将此行添加到 config.js 文件中

    config.removePlugins= 'toolbar';
    

    更新

    使用 css

       <head>
         <style> 
            .cke_top { display: none !important } 
         </style> 
       </head>
    

    【讨论】:

    • 还有其他解决方案吗?
    • BOLD,I,?.:.所有这些东西都显示出来了..那么如何隐藏??
    • 看看this它用css做了一个技巧是很好还是你想只用js隐藏它?
    • 我不明白..你能写在这里吗
    • 你只需要像这样添加 css 样式 .cke_top { display: none !important }
    猜你喜欢
    • 2013-05-25
    • 1970-01-01
    • 2017-12-01
    • 1970-01-01
    • 2020-08-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-15
    相关资源
    最近更新 更多