Home

# Class goog.editor.Plugin

Abstract API for trogedit plugins.

extends goog.events.EventTarget

Instance Method Summary
| `disable(?goog.editor.Field fieldObject)` Disables this plugin for the specified, registered field object.

`disposeInternal()`

Unattach listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners, it should be something like this:

    MyClass.prototype.disposeInternal = function() {
    MyClass.superClass_.disposeInternal.call(this);
    // Dispose logic for MyClass
    };

| `enable(?goog.editor.Field fieldObject)` Enables this plugin for the specified, registered field object. A field object should only be enabled when it is loaded.

`execCommand(string command, <Any Type> var_args) ⇒ <Any Type>`

Handles execCommand. This default implementation handles dispatching BEFORECHANGE, CHANGE, and SELECTIONCHANGE events, and calls execCommandInternal to perform the actual command. Plugins that want to do their own event dispatching should override execCommand, otherwise it is preferred to only override execCommandInternal. This version of execCommand will only work for single field plugins. Multi-field plugins must override execCommand.

| `getFieldDomHelper() ⇒ ?goog.dom.DomHelper`
| `isAutoDispose() ⇒ boolean`
| `isEnabled(?goog.editor.Field fieldObject) ⇒ boolean` Returns whether this plugin is enabled for the field object.
| `isSupportedCommand(string command) ⇒ boolean` Whether the string corresponds to a command this plugin handles.
| `registerFieldObject(?goog.editor.Field fieldObject)` Registers the field object for use with this plugin.
| `setAutoDispose(boolean autoDispose)` Set if this plugin should automatically be disposed when the registered field is disposed.
| `unregisterFieldObject(?goog.editor.Field fieldObj)` Unregisters and disables this plugin for the current field object.