## com.google.gwt.user.client.ui
Class RichTextArea

    java.lang.Object
      com.google.gwt.user.client.ui.UIObject
          com.google.gwt.user.client.ui.Widget
              com.google.gwt.user.client.ui.FocusWidget
                  com.google.gwt.user.client.ui.RichTextArea

All Implemented Interfaces:
  HasAllFocusHandlers, HasAllKeyHandlers, HasAllMouseHandlers, HasBlurHandlers, HasClickHandlers, HasFocusHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasHandlers, EventListener, Focusable, HasFocus, HasHTML, HasText, SourcesClickEvents, SourcesFocusEvents, SourcesKeyboardEvents, SourcesMouseEvents

    public class RichTextArea

extends FocusWidget
implements HasHTML, SourcesMouseEvents, HasAllMouseHandlers

A rich text editor that allows complex styling and formatting. Because some browsers do not support rich text editing, and others support only a limited subset of functionality, there are two formatter interfaces, accessed via `getBasicFormatter()` and `getExtendedFormatter()`. A browser that does not support rich text editing at all will return `null` for both of these, while one that supports only the basic functionality will return `null` for the latter.

### CSS Style Rules

- .gwt-RichTextArea { }

Nested Class Summary
`static interface` | `RichTextArea.BasicFormatter` This interface is used to access basic formatting options, when available.
`static interface` | `RichTextArea.ExtendedFormatter` This interface is used to access full formatting options, when available.
`static class` | `RichTextArea.FontSize` Font size enumeration.
`static class` | `RichTextArea.Justification` Justification enumeration.

Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
`UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled`

Field Summary

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

Constructor Summary
`RichTextArea()` Creates a new, blank `RichTextArea` object with no stylesheet.

Method Summary
`RichTextArea.BasicFormatter` | `getBasicFormatter()` Gets the basic rich text formatting interface.
`RichTextArea.ExtendedFormatter` | `getExtendedFormatter()` Gets the full rich text formatting interface.
`java.lang.String` | `getHTML()` Gets this object's contents as HTML.
`java.lang.String` | `getText()` Gets this object's text.
`protected void` | `onAttach()` This method is called when a widget is attached to the browser's document.
`protected void` | `onDetach()` This method is called when a widget is detached from the browser's document.
`void` | `setFocus(boolean focused)` Explicitly focus/unfocus this widget.
`void` | `setHTML(java.lang.String html)` Sets this object's contents via HTML.
`void` | `setText(java.lang.String text)` Sets this object's text.

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

`addBlurHandler, addClickHandler, addClickListener, addFocusHandler, addFocusListener, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, getFocusImpl, getTabIndex, isEnabled, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setElement, setEnabled, setTabIndex`

Methods inherited from class com.google.gwt.user.client.ui.Widget
`addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, sinkEvents`

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, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.google.gwt.user.client.ui.SourcesMouseEvents
`addMouseListener, removeMouseListener`

Methods inherited from interface com.google.gwt.event.dom.client.HasMouseDownHandlers
`addMouseDownHandler`

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

Methods inherited from interface com.google.gwt.event.dom.client.HasMouseUpHandlers
`addMouseUpHandler`

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

Methods inherited from interface com.google.gwt.event.dom.client.HasMouseOutHandlers
`addMouseOutHandler`

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

Methods inherited from interface com.google.gwt.event.dom.client.HasMouseOverHandlers
`addMouseOverHandler`

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

Methods inherited from interface com.google.gwt.event.dom.client.HasMouseMoveHandlers
`addMouseMoveHandler`

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

Methods inherited from interface com.google.gwt.event.dom.client.HasMouseWheelHandlers
`addMouseWheelHandler`

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

Constructor Detail

### RichTextArea

    public RichTextArea()

  Creates a new, blank `RichTextArea` object with no stylesheet.

Method Detail

### getBasicFormatter

    public RichTextArea.BasicFormatter getBasicFormatter()

  Gets the basic rich text formatting interface.

  Returns:
    `null` if basic formatting is not supported

### getExtendedFormatter

    public RichTextArea.ExtendedFormatter getExtendedFormatter()

  Gets the full rich text formatting interface.

  Returns:
    `null` if full formatting is not supported

### getHTML

    public java.lang.String getHTML()

  Description copied from interface: `HasHTML`
  Gets this object's contents as HTML.

  Specified by:
    `getHTML` in interface `HasHTML`
  Returns:
    the object's HTML

### getText

    public java.lang.String getText()

  Description copied from interface: `HasText`
  Gets this object's text.

  Specified by:
    `getText` in interface `HasText`
  Returns:
    the object's text

### setFocus

    public void setFocus(boolean focused)

  Description copied from interface: `Focusable`
  Explicitly focus/unfocus this widget. Only one widget can have focus at a time, and the widget that does will receive all keyboard events.

  Specified by:
    `setFocus` in interface `Focusable`
  Overrides:
    `setFocus` in class `FocusWidget`
  Parameters:
    `focused` - whether this widget should take focus or release it

### setHTML

    public void setHTML(java.lang.String html)

  Description copied from interface: `HasHTML`
  Sets this object's contents via HTML. Use care when setting an object's HTML; it is an easy way to expose script-based security problems. Consider using `HasText.setText(String)` whenever possible.

  Specified by:
    `setHTML` in interface `HasHTML`
  Parameters:
    `html` - the object's new HTML

### setText

    public void setText(java.lang.String text)

  Description copied from interface: `HasText`
  Sets this object's text.

  Specified by:
    `setText` in interface `HasText`
  Parameters:
    `text` - the object's new text

### onAttach

    protected void onAttach()

  Description copied from class: `Widget`
  This method is called when a widget is attached to the browser's document. To receive notification after a Widget has been added to the document, override the `Widget.onLoad()` method.

  Subclasses that override this method must call `super.onAttach()` to ensure that the Widget has been attached to its underlying Element.

  Overrides:
    `onAttach` in class `Widget`

### onDetach

    protected void onDetach()

  Description copied from class: `Widget`
  This method is called when a widget is detached from the browser's document. To receive notification before a Widget is removed from the document, override the `Widget.onUnload()` method.

  Subclasses that override this method must call `super.onDetach()` to ensure that the Widget has been detached from the underlying Element. Failure to do so will result in application memory leaks due to circular references between DOM Elements and JavaScript objects.

  Overrides:
    `onDetach` in class `Widget`