public class RemoveFormatExecutable extends org.xwiki.gwt.user.client.ui.rta.cmd.internal.ToggleInlineStyleExecutable
| Modifier and Type | Field and Description |
|---|---|
static String |
CSS_TEXT
The property of the style object which holds the value of the style attribute.
|
static List<String> |
DO_NOT_SPLIT
The list of HTML tags that shouldn't be split while removing the in-line style.
|
cache, domUtilsrta| Constructor and Description |
|---|
RemoveFormatExecutable(RichTextArea rta)
Creates a new executable that can be used to remove the in-line style from the current text selection.
|
| Modifier and Type | Method and Description |
|---|---|
protected Stack<com.google.gwt.dom.client.Node> |
getInlineAncestorsStack(com.google.gwt.dom.client.Node node)
Computes the stack of in-line ancestors, starting with the given node and ending with its top most in-line
ancestor.
|
String |
getParameter() |
boolean |
isExecuted() |
protected void |
isolateUpTo(com.google.gwt.dom.client.Node child,
com.google.gwt.dom.client.Node top)
Isolates the ancestors of the given child node up to the specified top ancestor.
|
protected TextFragment |
removeStyle(Text text,
int firstCharIndex,
int lastCharIndex) |
protected void |
reorder(com.google.gwt.dom.client.Node top,
com.google.gwt.dom.client.Node child)
Moves the parent of the given child node before the specified top and replicates three times the ancestors up to
the top: once for the left siblings of the given child node, once the child node itself and once for the right
siblings of the given child node.
|
protected boolean |
splitParenStyle(com.google.gwt.dom.client.Node child)
Removes the in-line style from the parent of the given node and applies it to the given node's siblings.
|
addStyle, execute, execute, isExecuted, matchesInheritedStyle, matchesStyle, matchesStyleaddStyle, execute, getNonEmptyTextNodes, getParameter, getParameter, getParameter, getPropertyhasValidSelection, isEnabledisSupportedpublic static final String CSS_TEXT
public RemoveFormatExecutable(RichTextArea rta)
rta - the execution targetprotected TextFragment removeStyle(Text text, int firstCharIndex, int lastCharIndex)
removeStyle in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.ToggleInlineStyleExecutableprotected Stack<com.google.gwt.dom.client.Node> getInlineAncestorsStack(com.google.gwt.dom.client.Node node)
node - a DOM nodeprotected boolean splitParenStyle(com.google.gwt.dom.client.Node child)
child - a DOM nodetrue if the in-line style has been split, false otherwiseprotected void reorder(com.google.gwt.dom.client.Node top,
com.google.gwt.dom.client.Node child)
top - the ancestor before which the parent is movedchild - the child node whose parent is moved before the topprotected void isolateUpTo(com.google.gwt.dom.client.Node child,
com.google.gwt.dom.client.Node top)
child - the child node whose ancestors will be isolatedtop - the top most ancestor that will be isolatedpublic boolean isExecuted()
isExecuted in interface ExecutableisExecuted in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.ToggleInlineStyleExecutablepublic String getParameter()
getParameter in interface ExecutablegetParameter in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.InlineStyleExecutableCopyright © 2004–2016 XWiki. All rights reserved.