Class CmsTinyMCEWidget

java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.ComplexPanel
com.google.gwt.user.client.ui.FlowPanel
org.opencms.gwt.client.ui.input.tinymce.CmsTinyMCEWidget
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasResizeHandlers, com.google.gwt.event.logical.shared.HasValueChangeHandlers<String>, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IndexedPanel, com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget, com.google.gwt.user.client.ui.InsertPanel, com.google.gwt.user.client.ui.InsertPanel.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, Iterable<com.google.gwt.user.client.ui.Widget>, I_CmsHasInit, I_CmsFormWidget

public final class CmsTinyMCEWidget extends com.google.gwt.user.client.ui.FlowPanel implements I_CmsFormWidget, com.google.gwt.event.logical.shared.HasResizeHandlers, I_CmsHasInit, com.google.gwt.event.logical.shared.HasValueChangeHandlers<String>
This class is used to start TinyMCE for editing the content of an element.

After constructing the instance, the actual editor is opened using the init() method, and destroyed with the close() method. While the editor is opened, the edited contents can be accessed using the methods of the HasValue interface.

  • Nested Class Summary

    Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

    com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled

    Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets

    com.google.gwt.user.client.ui.HasWidgets.ForIsWidget

    Nested classes/interfaces inherited from interface org.opencms.gwt.client.ui.input.I_CmsFormWidget

    I_CmsFormWidget.FieldType

    Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel

    com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget

    Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel

    com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
    The current content.
    protected com.google.gwt.core.client.JavaScriptObject
    The TinyMCE editor instance.
    protected String
    The DOM ID of the editable element.
    protected String
    The original HTML content of the editable element.
    protected int
    The maximal width of the widget.
    static final String
    Use as option to disallow any HTML or formatting the content.
    static final String
    The widget type id.

    Fields inherited from class com.google.gwt.user.client.ui.UIObject

    DEBUG_ID_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance with the given TinyMCE options.
    Creates a new instance based on configuration data from the server.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.gwt.event.shared.HandlerRegistration
    addResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler handler)
     
    com.google.gwt.event.shared.HandlerRegistration
    addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<String> handler)
     
    protected void
    Checks whether the necessary Javascript libraries are available by accessing them.
    protected String
    ensureId(com.google.gwt.dom.client.Element element)
    Gives an element an id if it doesn't already have an id, and then returns the element's id.
    protected void
    fireValueChange(boolean force)
    Fires a change event.
    Returns the "apparent value", i.e.
    protected com.google.gwt.dom.client.Element
    Returns the editor parent element.
    protected com.google.gwt.dom.client.Element
    Gets an element by its id.
    Returns the type of data this widget produces.
    Gets the selected/entered value from the widget.
    Gets the current value of the widget as a string.
    com.google.gwt.dom.client.Element
    Gets the main editable element.
    protected com.google.gwt.dom.client.Element
    Gets the toolbar element.
    Gets the value.
    static void
    Initializes this class.
    boolean
    Returns true if this widget is enabled.
    protected void
     
    protected void
     
    protected void
     
    protected void
    Propagates the a focus event.
    protected void
    propagateMouseEvent(String eventType, com.google.gwt.dom.client.Element eventSource)
    Propagates a native mouse event.
    protected void
    Sets focus to the editor.
    protected void
    Removes the editor instance.
    void
    Resets the widget to its default state.
    protected void
    Schedules to reset the focus to the main element.
    void
    Call this when auto hiding parents are shown.
    void
    setEnabled(boolean enabled)
    Enables or disables the widget.
    void
    setErrorMessage(String errorMessage)
    Sets the error message for this widget.
    void
    Sets the current value of the widget as a string.
    protected void
    Sets the main content of the element which is inline editable.
    protected void
    setPreviousValue(String previousValue)
    Sets the previous value.
    void
    setValue(String value, boolean fireEvents)
    Sets the value.

    Methods inherited from class com.google.gwt.user.client.ui.FlowPanel

    add, clear, insert, insert

    Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel

    add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove

    Methods inherited from class com.google.gwt.user.client.ui.Panel

    add, adopt, doAttachChildren, doDetachChildren, orphan, remove

    Methods inherited from class com.google.gwt.user.client.ui.Widget

    addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, removeFromParent, setLayoutData, sinkEvents, unsinkEvents

    Methods inherited from class com.google.gwt.user.client.ui.UIObject

    addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.gwt.event.shared.HasHandlers

    fireEvent

    Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel

    getWidget, getWidgetCount, getWidgetIndex, remove

    Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget

    getWidgetIndex

    Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget

    add

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator