Class type Goog.​Geditor.​field

class type field = object..end

Inherits


method inModalMode : bool Js.t Js.meth

Returns Whether we're in modal interaction mode. When this returns true, another plugin is interacting with the field contents in a synchronous way, and expects you not to make changes to the field's DOM structure or selection.

method setModalMode : bool Js.t -> unit Js.meth
method getHashCode : Js.js_string Js.t Js.meth

Returns a string usable as a hash code for this field. For field's that were created with an id, the hash code is guaranteed to be the id. TODO(user): I think we can get rid of this. Seems only used from editor.

Returns The hash code for this editable field.

method getElement : Dom_html.element Js.t Js.meth

Returns the editable DOM element or null if this field is not editable. <p>On IE or Safari this is the element with contentEditable=true (in whitebox mode, the iFrame body). <p>On Gecko this is the iFrame body TODO(user): How do we word this for subclass version?

Returns The editable DOM element, defined as above.

method getOriginalElement : Dom_html.element Js.t Js.meth

Returns original DOM element that is being made editable by Trogedit or null if that element has not yet been found in the appropriate document.

Returns The original element.

method addListener : 
(Js.js_string Js.t, Js.js_string Js.t Js.js_array Js.t) Goog.Tools.Union.t ->
(unit -> unit) Js.callback -> bool Js.t Js.opt -> unit Js.meth

Registers a keyboard event listener on the field. This is necessary for Gecko since the fields are contained in an iFrame and there is no way to auto-propagate key events up to the main window.

method getPluginByClassId : Js.js_string Js.t -> plugin Js.t Js.meth

Returns the registered plugin with the given classId.

Returns Registered plugin with the given classId.

method setInitialStyle : Js.js_string Js.t -> unit Js.meth

Sets the value that will replace the style attribute of this field's element when the field is made non-editable. This method is called with the current value of the style attribute when the field is made editable.

method resetOriginalElemProperties : unit Js.meth

Reset the properties on the original field element to how it was before it was made editable.

method isModified : bool Js.t Js.opt -> bool Js.t Js.meth

Checks the modified state of the field. Note: Changes that take place while the goog.editor.Field.EventType.CHANGE event is stopped do not effect the modified state.

Returns Whether the field has been modified.

method usesIframe : bool Js.t Js.meth

Returns Whether the field is implemented as an iframe.

method isFixedHeight : bool Js.t Js.meth

Returns Whether the field should be rendered with a fixed height, or should expand to fit its contents.

method setAppWindow : Dom_html.window Js.t -> unit Js.meth

Sets the application window.

method getAppWindow : Dom_html.window Js.t Js.meth

Returns the "application" window, where dialogs and bubbles should be rendered.

Returns The window.

method setBaseZindex : int -> unit Js.meth

Sets the zIndex that the field should be based off of. TODO(user): Get rid of this completely. Here for Sites. Should this be set directly on UI plugins?

method getBaseZindex : int Js.meth

Returns the zindex of the base level of the field.

Returns The base zindex of the editor.

method disposeInternal : unit Js.meth

Removes all listeners and destroys the eventhandler object.

method attachWrapper : 
'a. (#Goog.Disposable.disposable as 'a) Js.t -> unit Js.meth

Attach an wrapper to this field, to be thrown out when the field is disposed.

method removeAllWrappers : unit Js.meth

Removes all wrappers and destroys them.

method getInjectableContents : 
Js.js_string Js.t -> Js.js_string Js.t Js.meth

Returns prepared contents that can be injected into the editable field.

Returns The prepared contents.

method getEditableDomHelper : Goog.Gdom.domHelper Js.t Js.opt Js.meth

Returns The dom helper for the editable node.

method dispatchSelectionChangeEvent : 
'b. (#Goog.Events.browserEvent as 'b) Js.t -> unit Js.meth

Dispatch a selection change event, optionally caused by the given browser event.

method dispatchBeforeChange : unit Js.meth

This dispatches the beforechange event on the editable field

method stopChangeEvents : 
bool Js.t Js.opt -> bool Js.t Js.opt