public class HtmlEditor extends AdapterField<String>
Modifier and Type | Class and Description |
---|---|
static interface |
HtmlEditor.HtmlEditorAppearance
The appearance of this class.
|
static interface |
HtmlEditor.HtmlEditorMessages
The locale-sensitive messages used by this class.
|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
HasWidgets.ForIsWidget
IndexedPanel.ForIsWidget
DEBUG_ID_PREFIX
Constructor and Description |
---|
HtmlEditor()
Creates an HTML-based rich text editor with support for fonts, text justification, lists, hyperlinks and text
color.
|
HtmlEditor(HtmlEditor.HtmlEditorAppearance appearance)
Creates an HTML-based rich text editor with support for fonts, text justification, lists, hyperlinks and text
color.
|
Modifier and Type | Method and Description |
---|---|
HtmlEditor.HtmlEditorAppearance |
getAppearance() |
HtmlEditor.HtmlEditorMessages |
getMessages()
Returns the locale-sensitive messages used by this class.
|
RichTextArea |
getTextArea()
Returns the
RichTextArea . |
String |
getValue() |
boolean |
isEnableAlignments()
Returns
true if text justification is enabled. |
boolean |
isEnableColors()
Returns
true if setting text foreground and background colors is enabled. |
boolean |
isEnableFont()
Returns
true if setting font family name is enabled. |
boolean |
isEnableFontSize()
Returns
true if setting font size is enabled. |
boolean |
isEnableFormat()
Returns
true if setting font style is enabled. |
boolean |
isEnableLinks()
Returns
true if creating a hyperlink from selected text is enabled. |
boolean |
isEnableLists()
Returns
true if creating lists is enabled. |
boolean |
isEnableSourceEditMode()
Returns
true if the ability to switch to HTML source mode is enabled. |
boolean |
isShowToolBar()
Returns
true if the toolbar is displayed. |
boolean |
isSourceEditMode()
Returns
true if the editor is in source edit mode. |
void |
pushValue()
Copies the value of the HTML source editor to the rich text editor.
|
void |
setEnableAlignments(boolean enableAlignments)
Sets whether text justification is enabled (defaults to
true , pre-render). |
void |
setEnableColors(boolean enableColors)
Sets whether setting text foreground and background colors is enabled (defaults to
true , pre-render). |
void |
setEnableFont(boolean enableFont)
Sets whether setting font family name is enabled (defaults to
true , pre-render). |
void |
setEnableFontSize(boolean enableFontSize)
Sets whether setting font size is enabled (defaults to
true , pre-render). |
void |
setEnableFormat(boolean enableFormat)
Sets whether setting font style is enabled (defaults to
true , pre-render). |
void |
setEnableLinks(boolean enableLinks)
Sets whether creating a hyperlink from selected text is enable (defaults to
true , pre-render). |
void |
setEnableLists(boolean enableLists)
Sets whether creating lists is enabled (defaults to
true , pre-render). |
void |
setEnableSourceEditMode(boolean enable)
Sets whether the source edit mode is enabled (defaults to
true , pre-render). |
void |
setMessages(HtmlEditor.HtmlEditorMessages messages)
Sets the local-sensitive messages used by this class.
|
void |
setShowToolBar(boolean showToolBar)
Sets whether the toolbar should be shown.
|
void |
setSourceEditMode(boolean sourceEditMode)
Specifies if the editor should be in source edit mode.
|
void |
setValue(String value) |
void |
syncValue()
Copies the value of the rich text editor to the HTML source editor.
|
addInvalidHandler, addValidator, addValidHandler, addValueChangeHandler, clear, clearInvalid, disable, enable, finishEditing, flush, forceInvalid, getErrors, getErrorSupport, getValidators, isValid, isValid, markInvalid, onPropertyChange, removeValidator, reset, setDelegate, setErrorSupport, showErrors, validate, validate
add, add, getWidget, isResize, setResize, setWidget, setWidget
forceLayout, isLayoutRunning, isOrWasLayoutRunning, onResize
add, addAddHandler, addBeforeAddHandler, addBeforeRemoveHandler, addContainerHandler, addRemoveHandler, findWidget, getItemByItemId, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, iterator, remove, remove, remove
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleOnOver, clearSizeCache, disableEvents, enableEvents, fireEvent, focus, getData, getElement, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hide, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isRendered, isStateful, isVisible, isVisible, mask, mask, onBrowserEvent, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addBlurHandler
fireEvent
public HtmlEditor()
public HtmlEditor(HtmlEditor.HtmlEditorAppearance appearance)
public HtmlEditor.HtmlEditorAppearance getAppearance()
public HtmlEditor.HtmlEditorMessages getMessages()
public String getValue()
public RichTextArea getTextArea()
RichTextArea
.public boolean isEnableAlignments()
true
if text justification is enabled.true
if text justification is enabledpublic boolean isEnableColors()
true
if setting text foreground and background colors is enabled.true
if setting text foreground and background colors is enabledpublic boolean isEnableFont()
true
if setting font family name is enabled.true
if setting font family name is enabledpublic boolean isEnableFontSize()
true
if setting font size is enabled.true
if setting font size is enabledpublic boolean isEnableFormat()
true
if setting font style is enabled.true
if setting font style is enabledpublic boolean isEnableLinks()
true
if creating a hyperlink from selected text is enabled.true
if creating a hyperlink from selected text is enabledpublic boolean isEnableLists()
true
if creating lists is enabled.true
if creating lists is enabledpublic boolean isEnableSourceEditMode()
true
if the ability to switch to HTML source mode is enabled.true
if the ability to switch to HTML source mode is enabledpublic boolean isShowToolBar()
true
if the toolbar is displayed.true
if the toolbar is displayedpublic boolean isSourceEditMode()
true
if the editor is in source edit mode.true
if editor is in source edit modepublic void pushValue()
public void setEnableAlignments(boolean enableAlignments)
true
, pre-render).enableAlignments
- true
to enable text justificationpublic void setEnableColors(boolean enableColors)
true
, pre-render).enableColors
- true
to enable setting text foreground and background colors.public void setEnableFont(boolean enableFont)
true
, pre-render).enableFont
- true
to enable setting font family namepublic void setEnableFontSize(boolean enableFontSize)
true
, pre-render).enableFontSize
- true
to enable setting font sizepublic void setEnableFormat(boolean enableFormat)
true
, pre-render).enableFormat
- true
to enable setting font stylepublic void setEnableLinks(boolean enableLinks)
true
, pre-render).enableLinks
- true
to enable creating a hyperlink from selected textpublic void setEnableLists(boolean enableLists)
true
, pre-render).enableLists
- true
to enable creating listspublic void setEnableSourceEditMode(boolean enable)
true
, pre-render).enable
- true
if source edit mode is enabledpublic void setMessages(HtmlEditor.HtmlEditorMessages messages)
messages
- the locale sensitive messages used by this class.public void setShowToolBar(boolean showToolBar)
showToolBar
- true
to show the toolbar, false
otherwise.public void setSourceEditMode(boolean sourceEditMode)
setEnableSourceEditMode(boolean)
is set to true
.sourceEditMode
- true
to put editor in source edit modepublic void setValue(String value)
public void syncValue()
Copyright © 2015. All rights reserved.