| Package | Description |
|---|---|
| org.xwiki.gwt.user.client | |
| org.xwiki.gwt.user.client.ui.rta.cmd |
| Constructor and Description |
|---|
RichTextAreaCommand(RichTextArea rta,
Command command)
Creates a new GWT command that executes the specified rich text area command.
|
RichTextAreaCommand(RichTextArea rta,
Command command,
String parameter)
Creates a new GWT command that executes the specified rich text area command.
|
RichTextAreaCommand(RichTextArea rta,
Command command,
String parameter,
boolean focus)
Creates a new GWT command that executes the specified rich text area command.
|
| Modifier and Type | Field and Description |
|---|---|
static Command |
Command.BACK_COLOR
This command will set the background color of the document.
|
static Command |
Command.BOLD
If there is no selection, the insertion point will set bold for subsequently typed characters.
If there is a selection and all of the characters are already bold, the bold will be removed. |
static Command |
Command.CREATE_LINK
This command will insert a link in place of the current selection, either if it is a collapsed selection or an
expanded one.
|
static Command |
Command.DELETE
Deletes the current selection.
|
static Command |
Command.ENABLE
Enables or disables the rich text area.
|
static Command |
Command.FONT_NAME
This command will set the font face for a selection or at the insertion point if there is no selection.
The given string is such as would be used in the "name" attribute of the font tag. |
static Command |
Command.FONT_SIZE
This command will set the font size for a selection or at the insertion point if there is no selection.
The given number is such as would be used in the "size" attribute of the font tag. |
static Command |
Command.FORE_COLOR
This command will set the text color of the selection or at the insertion point.
|
static Command |
Command.FORMAT_BLOCK
Adds an HTML block-style tag around a selection or at the insertion point line.
|
static Command |
Command.INDENT
Indent the block where the caret is located.
|
static Command |
Command.INSERT_BR_ON_RETURN
Selects whether pressing return inside a paragraph creates another paragraph or just inserts a
<br> tag. |
static Command |
Command.INSERT_HORIZONTAL_RULE
This command will insert a horizontal rule (line) at the insertion point.
Does it delete the selection? Yes! |
static Command |
Command.INSERT_HTML
This command will insert the given HTML into the <body> in place of the current selection or at the caret
location.
The given string is the HTML to insert. |
static Command |
Command.INSERT_IMAGE
This command will insert an image (referenced by the given url) at the insertion point.
|
static Command |
Command.INSERT_ORDERED_LIST
Depends on the selection.
|
static Command |
Command.INSERT_PARAGRAPH
Inserts a new paragraph.
|
static Command |
Command.INSERT_UNORDERED_LIST
Depends on the selection.
|
static Command |
Command.ITALIC
If there is no selection, the insertion point will set italic for subsequently typed characters.
If there is a selection and all of the characters are already italic, the italic will be removed. |
static Command |
Command.JUSTIFY_CENTER
Center-aligns the current block.
|
static Command |
Command.JUSTIFY_FULL
Fully-justifies the current block.
|
static Command |
Command.JUSTIFY_LEFT
Left-aligns the current block.
|
static Command |
Command.JUSTIFY_RIGHT
Right aligns the current block.
|
static Command |
Command.OUTDENT
Outdent the block where the caret is located.
|
static Command |
Command.REDO
This command will redo the previous undo action.
|
static Command |
Command.REMOVE_FORMAT
Removes inline formatting from the current selection.
|
static Command |
Command.RESET
Resets the content of the rich text area.
|
static Command |
Command.STRIKE_THROUGH
If there is no selection, the insertion point will set strikethrough for subsequently typed characters.
If there is a selection and all of the characters are already striked, the strikethrough will be removed. |
static Command |
Command.STYLE_WITH_CSS
This command is used for toggling the format of generated content.
|
static Command |
Command.SUB_SCRIPT
If there is no selection, the insertion point will set subscript for subsequently typed characters.
If there is a selection and all of the characters are already subscripted, the subscript will be removed. |
static Command |
Command.SUPER_SCRIPT
If there is no selection, the insertion point will set superscript for subsequently typed characters.
If there is a selection and all of the characters are already superscripted, the superscript will be removed. |
static Command |
Command.TELETYPE
If there is no selection, the insertion point will be set to teletype for subsequently typed characters.
If there is a selection and all of the characters have already teletype style, the teletype will be removed. |
static Command |
Command.UNDERLINE
If there is no selection, the insertion point will set underline for subsequently typed characters.
If there is a selection and all of the characters are already underlined, the underline will be removed. |
static Command |
Command.UNDO
This command will undo the previous action.
|
static Command |
Command.UNLINK
If the insertion point is within a link or if the current selection contains a link, the link will be removed and
the text will remain.
|
static Command |
Command.UPDATE
This command is used only to notify the command listeners that they need to update their state.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
CommandManager.execute(Command cmd)
Executes a command on the current selection of the document edited with the underlying rich text area.
|
boolean |
CommandManager.execute(Command cmd,
boolean param)
Executes a command on the current selection of the document edited with the underlying rich text area.
|
boolean |
CommandManager.execute(Command cmd,
int param)
Executes a command on the current selection of the document edited with the underlying rich text area.
|
boolean |
CommandManager.execute(Command cmd,
String param)
Executes a command on the current selection of the document edited with the underlying rich text area.
|
boolean |
CommandListenerCollection.fireBeforeCommand(CommandManager sender,
Command command,
String param)
Notifies all the listeners in this collection that the specified command is about to be executed.
|
void |
CommandListenerCollection.fireCommand(CommandManager sender,
Command command,
String param)
Notifies all the listeners in this collection that the specified command was executed.
|
Boolean |
CommandManager.getBooleanValue(Command cmd)
Returns the value of the given command for the current selection in the document edited with the underlying rich
text area.
|
Executable |
CommandManager.getExecutable(Command command) |
Integer |
CommandManager.getIntegerValue(Command cmd)
Returns the value of the given command for the current selection in the document edited with the underlying rich
text area.
|
String |
CommandManager.getStringValue(Command cmd)
Returns the value of the given command for the current selection in the document edited with the underlying rich
text area.
|
boolean |
CommandManager.isEnabled(Command cmd)
Returns a boolean value that indicates whether the specified command can be successfully executed using
CommandManager.execute(Command, String), given the current selection of the document edited with the underlying rich
text area. |
boolean |
CommandManager.isExecuted(Command cmd)
Returns a boolean value that indicates the current state of the given command.
|
boolean |
CommandManager.isSupported(Command cmd)
Returns a boolean value that indicates whether the current command is supported by the underlying rich text area.
|
boolean |
CommandListener.onBeforeCommand(CommandManager sender,
Command command,
String param)
Notifies that the given command is about to be executed with the given parameter by the specified command
manager.
|
void |
CommandListener.onCommand(CommandManager sender,
Command command,
String param)
Notifies that the given command has been executed with the given parameter by the specified command manager.
|
Executable |
CommandManager.registerCommand(Command command,
Executable executable)
Associates the given command with the specified executable.
|
Executable |
CommandManager.unregisterCommand(Command command)
Unregisters the given command.
|
Copyright © 2004–2015 XWiki. All rights reserved.