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 |
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.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
RichTextArea.BasicFormatter |
This interface is deprecated.
use RichTextArea.Formatter instead
|
||||||||||
RichTextArea.ExtendedFormatter |
This interface is deprecated.
use RichTextArea.Formatter instead
|
||||||||||
RichTextArea.FontSize | Font size enumeration. | ||||||||||
RichTextArea.Formatter | This interface is used to access full formatting options, when available. |
||||||||||
RichTextArea.Justification | Justification enumeration. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new, blank
RichTextArea object with no stylesheet. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds an
InitializeEvent handler. | |||||||||||
This method is deprecated.
use
getFormatter() instead
| |||||||||||
This method is deprecated.
use
getFormatter() instead
| |||||||||||
Gets the rich text formatting interface.
| |||||||||||
Gets this object's contents as HTML.
| |||||||||||
Gets this object's text.
| |||||||||||
Gets whether this widget is enabled.
| |||||||||||
Sets whether this widget is enabled.
| |||||||||||
Explicitly focus/unfocus this widget.
| |||||||||||
Sets this object's contents via known-safe HTML.
| |||||||||||
Sets this object's contents via HTML.
| |||||||||||
Sets this object's text.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is called when a widget is attached to the browser's document. | |||||||||||
This method is called when a widget is detached from the browser's document. |
Adds an InitializeEvent
handler.
handler | the handler |
---|
This method is deprecated.
use getFormatter()
instead
Gets the basic rich text formatting interface. Note that formatting can
only be done when the RichTextArea
is attached, visible on the
page, and has been focused by the user.
null
if basic formatting is not supported
This method is deprecated.
use getFormatter()
instead
Gets the full rich text formatting interface. Note that formatting can only
be done when the RichTextArea
is attached, visible on the page, and
has been focused by the user.
null
if full formatting is not supportedGets the rich text formatting interface. Note that formatting can only be
done when the RichTextArea
is attached, visible on the page, and
has been focused by the user.
null
if full formatting is not supported
Gets whether this widget is enabled.
true
if the widget is enabled
Sets whether this widget is enabled.
enabled | true to enable the widget, false
to disable it
|
---|
Explicitly focus/unfocus this widget. Only one widget can have focus at a time, and the widget that does will receive all keyboard events.
focused | whether this widget should take focus or release it |
---|
Sets this object's contents via known-safe HTML.
The object will behave exactly the same as when a widget's
setHTML(String)
method is
invoked; however the SafeHtml
passed to this method observes the
contract that it can be used in an HTML context without causing unsafe
script execution. Thus, unlike
setHTML(String)
, using this
method cannot result in Cross-Site Scripting security vulnerabilities.
html | the object's new HTML, represented as a SafeHtml object
|
---|
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 setText(String)
whenever possible.
html | the object's new HTML |
---|
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 onLoad()
method or use addAttachHandler(AttachEvent.Handler)
.
It is strongly recommended that you override onLoad()
or
doAttachChildren()
instead of this method to avoid inconsistencies
between logical and physical attachment states.
Subclasses that override this method must call
super.onAttach()
to ensure that the Widget has been attached
to its underlying Element.
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 onUnload()
method or use addAttachHandler(AttachEvent.Handler)
.
It is strongly recommended that you override onUnload()
or
doDetachChildren()
instead of this method to avoid inconsistencies
between logical and physical attachment states.
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.