首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在c#中隐藏ckeditor的所有工具栏

如何在c#中隐藏ckeditor的所有工具栏
EN

Stack Overflow用户
提问于 2016-12-23 08:14:30
回答 1查看 2.2K关注 0票数 0

这是页面顶部的内容:

代码语言:javascript
复制
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

这是:

代码语言:javascript
复制
   <CKEditor:CKEditorControl ID="CKEditor1" BasePath="/ckeditor/" runat="server" EditingBlock="true" toolbar="emptyToolbar" ></CKEditor:CKEditorControl>

下面是config.js:

代码语言:javascript
复制
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编辑器的文本区域。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-12-23 08:16:56

将这一行添加到config.js文件中

代码语言:javascript
复制
config.removePlugins= 'toolbar';

更新的

使用css

代码语言:javascript
复制
   <head>
     <style> 
        .cke_top { display: none !important } 
     </style> 
   </head>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41297630

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档