goog.editor.plugins.EquationEditorPlugin
Classgoog.editor.plugins.EquationEditorPlugin
> goog.editor.plugins.AbstractDialogPlugin
> goog.editor.Plugin
> goog.events.EventTarget
> goog.Disposable
goog.editor.plugins.EquationEditorPlugin(opt_helpUrl)
A plugin that opens the equation editor in a dialog window.
opt_helpUrl
{string
=}
.activeOnUneditableFields
Inherited from goog.editor.Plugin
.
boolean
}
.addEventListener(type, handler, opt_capture, opt_handlerScope)
Inherited from goog.events.EventTarget
.
Adds an event listener to the event target. The same handler can only be added once per the type. Even if you add the same handler multiple times using the same type then it will only be called once when the event is dispatched. Supported for legacy but use goog.events.listen(src, type, handler) instead.
type
{string
}
handler
{Function
|Object
}
opt_capture
{boolean
=}
opt_handlerScope
{Object
=}
.addOnDisposeCallback(callback, opt_scope)
Inherited from goog.Disposable
.
Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.
callback
{!Function
}
opt_scope
{Object
=}
.cleanContentsDom
Inherited from goog.editor.Plugin
.
Cleans the contents of the node passed to it. The node contents are modified directly, and the modifications will subsequently be used, for operations such as saving the innerHTML of the editor etc. Since the plugins act on the DOM directly, this method can be very expensive. This op is invoked even on disabled plugins.
fieldCopy
{!Element
}
.cleanContentsHtml
Inherited from goog.editor.Plugin
.
Cleans the html contents of Trogedit. Both cleanContentsDom and and cleanContentsHtml will be called on contents extracted from Trogedit. The inverse of prepareContentsHtml. This op is invoked even on disabled plugins.
originalHtml
{string
}
string
}
.createDialog(dialogDomHelper, opt_arg)
[protected]Creates a new instance of this plugin's dialog. Must be overridden by subclasses.
dialogDomHelper
{!goog.dom.DomHelper
}
opt_arg
{*=}
goog.ui.editor.AbstractDialog
}
.creationStack
{string
}Inherited from goog.Disposable
.
If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.
.disable()
.dispatchEvent(e)
Inherited from goog.events.EventTarget
.
Dispatches an event (or event like object) and calls all listeners listening for events of this type. The type of the event is decided by the type property on the event object. If any of the listeners returns false OR calls preventDefault then this function will return false. If one of the capture listeners calls stopPropagation, then the bubble listeners won't fire.
e
{string
|Object
|goog.events.Event
}
boolean
}
.dispose()
Inherited from goog.Disposable
.
Disposes of the object. If the object hasn't already been disposed of, calls {@link #disposeInternal}. Classes that extend {@code goog.Disposable} should override {@link #disposeInternal} in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.
void
}
.disposeInternal()
[protected]Inherited from goog.editor.plugins.AbstractDialogPlugin
.
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 };
.disposeOriginalSelection()
[protected]Inherited from goog.editor.plugins.AbstractDialogPlugin
.
Cleans up the structure used to save the original selection before the dialog was opened. Should be used by subclasses that don't restore the original selection via restoreOriginalSelection.
.enable()
.execCommand(command, var_args)
Inherited from goog.editor.plugins.AbstractDialogPlugin
.
Handles execCommand. Dialog plugins don't make any changes when they open a dialog, just when the dialog closes (because only modal dialogs are supported). Hence this method does not dispatch the change events that the superclass method does.
command
{string
}
var_args
{...*}
.execCommandInternal(command, opt_arg)
[protected]Inherited from goog.editor.plugins.AbstractDialogPlugin
.
Handles execCommand by opening the dialog. Dispatches {@link goog.editor.plugins.AbstractDialogPlugin.EventType.OPENED} after the dialog is shown.
command
{string
}
opt_arg
{*=}
.fieldObject
[protected] {goog.editor.Field
}Deprecated. Use goog.editor.Plugin.getFieldObject and goog.editor.Plugin.setFieldObject.
Inherited from goog.editor.Plugin
.
The field object this plugin is attached to.
.getDialog()
[protected]Inherited from goog.editor.plugins.AbstractDialogPlugin
.
Returns the current dialog that was created and opened by this plugin.
goog.ui.editor.AbstractDialog
}
.getDisposed
[deprecated]Deprecated. Use {@link #isDisposed} instead.
Inherited from goog.Disposable
.
boolean
}
.getFieldDomHelper()
Inherited from goog.editor.Plugin
.
goog.dom.DomHelper
?}
.getFieldObject()
[protected]Inherited from goog.editor.Plugin
.
Sets the field object for use with this plugin.
goog.editor.Field
}
.getParentEventTarget()
Inherited from goog.events.EventTarget
.
Returns the parent of this event target to use for bubbling.
goog.events.EventTarget
}
.getTrogClassId
.handleAfterHide(e)
[protected]Inherited from goog.editor.plugins.AbstractDialogPlugin
.
Cleans up after the dialog has closed, including restoring the selection to what it was before the dialog was opened. If a subclass modifies the editable field's content such that the original selection is no longer valid (usually the case when the user clicks OK, and sometimes also on Cancel), it is that subclass' responsibility to place the selection in the desired place during the OK or Cancel (or other) handler. In that case, this method will leave the selection in place.
e
{goog.events.Event
}
.handleKeyDown
Inherited from goog.editor.Plugin
.
Handles keydown. It is run before handleKeyboardShortcut and if it returns true handleKeyboardShortcut will not be called.
e
{!goog.events.BrowserEvent
}
boolean
}
.handleKeyPress
Inherited from goog.editor.Plugin
.
Handles keypress. It is run before handleKeyboardShortcut and if it returns true handleKeyboardShortcut will not be called.
e
{!goog.events.BrowserEvent
}
boolean
}
.handleKeyUp
Inherited from goog.editor.Plugin
.
Handles keyup.
e
{!goog.events.BrowserEvent
}
boolean
}
.handleKeyboardShortcut
Inherited from goog.editor.Plugin
.
Handles keyboard shortcuts. Preferred to using handleKey* as it will use the proper event based on browser and will be more performant. If handleKeyPress/handleKeyDown returns true, this will not be called. If the plugin handles the shortcut, it is responsible for dispatching appropriate events (change, selection change at the time of this comment). If the plugin calls execCommand on the editable field, then execCommand already takes care of dispatching events. NOTE: For performance reasons this is only called when any key is pressed in conjunction with ctrl/meta keys OR when a small subset of keys (defined in goog.editor.Field.POTENTIAL_SHORTCUT_KEYCODES_) are pressed without ctrl/meta keys. We specifically don't invoke it when altKey is pressed since alt key is used in many i8n UIs to enter certain characters.
e
{!goog.events.BrowserEvent
}
key
{string
}
isModifierPressed
{boolean
}
boolean
}
.handleSelectionChange
Inherited from goog.editor.Plugin
.
Handles selection change.
opt_e
{!goog.events.BrowserEvent
=}
opt_target
{!Node
=}
boolean
}
.isAutoDispose()
Inherited from goog.editor.Plugin
.
boolean
}
.isDisposed()
Inherited from goog.Disposable
.
boolean
}
.isEnabled(fieldObject)
Inherited from goog.editor.Plugin
.
Returns whether this plugin is enabled for the field object.
fieldObject
{goog.editor.Field
}
boolean
}
.isSilentCommand
Inherited from goog.editor.Plugin
.
command
{string
}
boolean
}
.isSupportedCommand(command)
Inherited from goog.editor.plugins.AbstractDialogPlugin
.
Whether the string corresponds to a command this plugin handles.
command
{string
}
boolean
}
.logger
[protected] {goog.debug.Logger
}Inherited from goog.editor.Plugin
.
The logger for this plugin.
.prepareContentsHtml
Inherited from goog.editor.Plugin
.
Prepares the given HTML for editing. Strips out content that should not appear in an editor, and normalizes content as appropriate. The inverse of cleanContentsHtml. This op is invoked even on disabled plugins.
originalHtml
{string
}
styles
{Object
}
string
}
.queryCommandValue
Inherited from goog.editor.Plugin
.
Gets the state of this command if this plugin serves that command.
command
{string
}
.registerDisposable(disposable)
Inherited from goog.Disposable
.
Associates a disposable object with this object so that they will be disposed together.
disposable
{goog.disposable.IDisposable
}
.registerFieldObject(fieldObject)
Inherited from goog.editor.Plugin
.
Registers the field object for use with this plugin.
fieldObject
{goog.editor.Field
}
.removeEventListener(type, handler, opt_capture, opt_handlerScope)
Inherited from goog.events.EventTarget
.
Removes an event listener from the event target. The handler must be the same object as the one added. If the handler has not been added then nothing is done.
type
{string
}
handler
{Function
|Object
}
opt_capture
{boolean
=}
opt_handlerScope
{Object
=}
.restoreOriginalSelection()
[protected]Inherited from goog.editor.plugins.AbstractDialogPlugin
.
Restores the selection in the editable field to what it was before the dialog was opened. This is not guaranteed to work if the contents of the field have changed.
.setAutoDispose(autoDispose)
Inherited from goog.editor.Plugin
.
Set if this plugin should automatically be disposed when the registered field is disposed.
autoDispose
{boolean
}
.setFieldObject(fieldObject)
[protected]Inherited from goog.editor.Plugin
.
Sets the field object for use with this plugin.
fieldObject
{goog.editor.Field
}
.setParentEventTarget(parent)
Inherited from goog.events.EventTarget
.
Sets the parent of this event target to use for bubbling.
parent
{goog.events.EventTarget
?}
.setReuseDialog(reuse)
[protected]Inherited from goog.editor.plugins.AbstractDialogPlugin
.
Sets whether this plugin should reuse the same instance of the dialog each time execCommand is called or create a new one. This is intended for use by subclasses only, hence protected.
reuse
{boolean
}
.unregisterFieldObject(fieldObj)
Inherited from goog.editor.Plugin
.
Unregisters and disables this plugin for the current field object.
fieldObj
{goog.editor.Field
}