CKEditor:显示插件按钮但命令不起作用

CKEditor: Plugin Button is shown but the command is not working

首先感谢大家的支持

我尝试为 CKEditor 创建我的第一个插件。 我用的是官方教程:http://docs.ckeditor.com/#!/guide/plugin_sdk_sample

按钮出现在工具栏中。但是如果我点击它,什么也不会发生。

这是我的代码plugin.js

CKEDITOR.plugins.add( 'drmail', {
    icons: 'drmail',
    init: function( editor ) {
        editor.addCommand( 'drmailCommand', {
            exec: function( editor ) {
                var now = new Date();
                editor.insertHtml( 'The current date and time is: <em>' + now.toString() + '</em>' );
            }
        });
        editor.ui.addButton( 'DRmail', {
            label: "E-Mail Adresse hinzufügen",
            command: 'drmailCommand',
            toolbar: 'insert'
        });
    }
});

感谢您的帮助。

我找到了。 (对 JS 调试器的提示非常好) 我在缓存中有一个旧的非功能性脚本版本。

院长