org.xwiki.gwt.wysiwyg.client.plugin.format.exec
Class FormatBlockExecutable
java.lang.Object
org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractRichTextAreaExecutable
org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractSelectionExecutable
org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractBlockExecutable
org.xwiki.gwt.wysiwyg.client.plugin.format.exec.FormatBlockExecutable
- All Implemented Interfaces:
- Executable
public class FormatBlockExecutable
- extends org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractBlockExecutable
Wraps the HTML fragment including the current selection in a specified block level element.
- Version:
- $Id: 668a8aa2cc50097f4136cd0bbc38e66e9aa5b2a0 $
|
Method Summary |
protected void |
execute(com.google.gwt.dom.client.Node node,
int startOffset,
int endOffset,
String tagName)
|
protected String |
getParameter(com.google.gwt.dom.client.Node node)
|
static void |
replace(Element element,
String tagName)
Replaces the given element with an element with the specified tag name, moving all the child nodes to the new
element. |
| Methods inherited from class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractBlockExecutable |
execute, execute, execute, getParameter, getParameter, wrap |
| Methods inherited from class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractSelectionExecutable |
hasValidSelection, isEnabled, isExecuted |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FormatBlockExecutable
public FormatBlockExecutable(RichTextArea rta)
- Create a new executable to be executed on the specified rich text area.
- Parameters:
rta - the execution target
execute
protected void execute(com.google.gwt.dom.client.Node node,
int startOffset,
int endOffset,
String tagName)
-
Formats as block the in-line neighborhood of the given node, using the specified block tag. If the specified tag
name is empty then the block format is removed (in-line formatting will be used instead).
- Specified by:
execute in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractBlockExecutable
- See Also:
AbstractBlockExecutable.execute(Node, int, int, String)
getParameter
protected String getParameter(com.google.gwt.dom.client.Node node)
-
Returns the tag used for block formatting. If the returned string is empty it means there's no block formatting
(in other words, in-line formatting). If the returned string is null it means the given node doesn't support
block formatting.
- Specified by:
getParameter in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractBlockExecutable
- See Also:
AbstractBlockExecutable.getParameter(Node)
replace
public static void replace(Element element,
String tagName)
- Replaces the given element with an element with the specified tag name, moving all the child nodes to the new
element.
- Parameters:
element - the element to be replacedtagName - the tag name of the replacing element
Copyright © 2004-2013 XWiki. All Rights Reserved.