Reputation: 67842
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?
Upvotes: 2
Views: 139
Reputation: 67842
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.
Upvotes: 2