首页 > 解决方案 > 配置ckeditor后无法删除插件

问题描述

假设您应该通过简单地执行以下操作来删除所有工具栏:

editor.config.removePlugins     = 'toolbar,elementspath';

但是,如果我在附加代码中执行该行,它不会返回。我没有收到“清除插件”的警报。我该怎么办?

<script type="text/javascript">

var editor;

function changeEnter()
{
    //alert ( "Got here..." );
    
    if ( editor )
        editor.destroy( true );

   var configShared = { toolbar           :
                        [ { name: 'colors',      items : [ 'TextColor', 'BGColor' ]                                    } ],
                        allowedContent    : true,
                        scayt_autoStartup : false,
                        height            : '200px',
                        width             : '300px',
                        enterMode         : 2  };

    // Create the editor again, with the appropriate settings and initialized text area.
   editor = CKEDITOR.replace( 'eDiv', configShared ).setData( " " );
   alert ( "Created editor" );
   editor.config.removePlugins     = 'toolbar,elementspath';
   alert ( "cleared out plugins" );
}

</script>

   
</HEAD>

标签: ckeditor

解决方案


推荐阅读