如何在编辑器中删除表单工具,并使大小可调



我在我的项目中使用CKE编辑器。我的要求是删除"FORM TOOLS"并使CKE编辑器ADJUSTABLE的大小。到目前为止,我已经成功地在网页中显示了编辑器。我搜索了谷歌,但不幸的是我什么也没找到。

试试这个

CKEDITOR.editorConfig = function( config ) {
    // Define changes to default configuration here. For example:
    // config.language = 'fr';
    // config.uiColor = '#AADC6E';
    config.removePlugins = 'forms';
};

通过阅读文档找到了一个解决方案,

我在config.js中添加了以下配置,

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

         CKEDITOR.config.resize_enabled = true;
         CKEDITOR.config.width = 600;
         CKEDITOR.config.autoGrow_minHeight = 600;
         CKEDITOR.config.autoGrow_maxHeight = 600;
         CKEDITOR.config.toolbar_Full =
[
    ['Source','-','Save','NewPage','Preview','-','Templates'],
    ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
    ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
//  ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'], // here i disable the form tools
    '/',
    ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
    ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
    ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
    ['BidiLtr', 'BidiRtl' ],
    ['Link','Unlink','Anchor'],
    ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
    '/',
    ['Styles','Format','Font','FontSize'],
    ['TextColor','BGColor'],
    ['Maximize', 'ShowBlocks','-','About']
];
};

最新更新