Frage

I'm trying to add behavior to a google closure editor, and I'm having trouble getting even an empty plugin to register.

(function() {

goog.provide('my.EscapeKeyPressedPlugin');

goog.require('goog.editor.Plugin');

my.EscapeKeyPressedPlugin = function() {
    goog.editor.Plugin.call(this);
};
goog.inherits(my.EscapeKeyPressedPlugin, goog.editor.Plugin);

Rally.ui.richtext.EscapeKeyPressedPlugin.prototype.getTrogClassId = function() {
    return 'EscapeKeyPressedPlugin';
};

})();

This is what I've conjured attempting to copy examples of built in plugins, but when I add this plugin to my editor, the editor becomes completely non-functional and no controls render. I don't get any js errors either, so I'm stuck.

What am I missing here?

War es hilfreich?

Lösung

The issue was namespacing. Something about how and when goog.provide or Ext.ns('') got hit caused the two to collide and destroy objects.

I moved to a new namespace and my example plugin works.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top