Usage Example:
RichTextEditor editor = RichTextEditor.create();
editor.setValue("Sample text");
See also :
public void RichTextEditor(RichTextActionsGroup[] actions)
actions
A list of actions to be added to the editor toolbars.
public void RichTextEditor()
public void RichTextEditor(Collection<RichTextActionsGroup> actions)
actions
A list of actions to be added to the editor toolbars.
public static RichTextEditor create()
a new instance of RichTextEditor
public static RichTextEditor create(RichTextActionsGroup[] actions)
actions
A list of actions to be added to the editor toolbars.
a new instance of RichTextEditor
public static RichTextEditor create(Collection<RichTextActionsGroup> actions)
actions
A list of actions to be added to the editor toolbars.
a new instance of RichTextEditor
public RichTextEditor withValue(String value)
This is a convenient method that internally calls setValue
value
The text value to be set in the editor.
The current RichTextEditor instance for chaining.
public RichTextEditor withValue(String value, boolean silent)
This method internally calls setValue . The silent parameter is currently not being used, and its functionality might be implemented in future versions.
value
The text value to be set in the editor.
silent
A flag to indicate if the operation should remain silent (currently not being used).
The current RichTextEditor instance for chaining.
public void setValue(String s)
The provided string is treated as HTML, and it's safely injected into the editor's content area.
s
The HTML content to be set in the editor.
public String getValue()
The editor's current content as an HTML string.
public RichTextEditor withEditableElement(ChildHandler<RichTextEditor, DivElement> handler)
handler
The handler to apply customizations.
The current instance for chaining.
public RichTextEditor withToolbars(ChildHandler<RichTextEditor, DivElement> handler)
handler
The handler to apply customizations.
The current instance for chaining.