如何删除ckeditor中的表单工具,并使大小可调

时间:2011-09-05 08:28:42

标签: ckeditor

我在我的项目中使用CKE编辑器。我的要求是删除“FORM TOOLS”并制作CKE编辑器ADJUSTABLE的大小。到目前为止,我已成功在网页中显示编辑器。我搜索谷歌但不幸的是我什么都没有。请帮助我。

2 个答案:

答案 0 :(得分:6)

试试这个

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

答案 1 :(得分:4)

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

我在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']
];
};