com.xpn.xwiki.wysiwyg.client.plugin.link.exec
Class LinkExecutableUtils

java.lang.Object
  extended by com.xpn.xwiki.wysiwyg.client.plugin.link.exec.LinkExecutableUtils

public class LinkExecutableUtils
extends java.lang.Object

Utility class to perform functions associated to link executables, such as detecting the selected anchor. We have this as static function in a distinct class since there is no way to insert this on both the CreateLinkExecutable and UnlinkExecutable hierarchies.

Version:
$Id: LinkExecutableUtils.java 24761 2009-10-29 15:45:32Z mflorea $

Field Summary
static java.lang.String ANCHOR_TAG_NAME
          The tag name of the anchor element.
 
Constructor Summary
protected LinkExecutableUtils()
          Protected constructor.
 
Method Summary
static Element getSelectedAnchor(RichTextArea rta)
          Returns the currently selected anchor element in the passed RichTextArea, as the user perceives the selection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANCHOR_TAG_NAME

public static final java.lang.String ANCHOR_TAG_NAME
The tag name of the anchor element.

See Also:
Constant Field Values
Constructor Detail

LinkExecutableUtils

protected LinkExecutableUtils()
Protected constructor.

Method Detail

getSelectedAnchor

public static Element getSelectedAnchor(RichTextArea rta)
Returns the currently selected anchor element in the passed RichTextArea, as the user perceives the selection. The algorithm used is as follows:

Parameters:
rta - the rich text area whose selection to test
Returns:
the anchor in which the current selection is found


Copyright © 2004-2010 XWiki. All Rights Reserved.