com.ephox.editlive.model
Interface ElementNavigator


public interface ElementNavigator

Assists with navigating between elements; methods are relative to the element it was created with. Instance available via DocumentManager.getElementNavigator(Element).

Since:
7.5

Method Summary
 Element getAncestorWithTag(HTML.Tag tag)
          Finds a parent element matching the given tag.
 Element getPreviousSibling()
          Finds the previous sibling of this element in its parent.
 

Method Detail

getPreviousSibling

Element getPreviousSibling()
Finds the previous sibling of this element in its parent.

Returns:
previous sibling, or this element if it is the first element in the parent.

getAncestorWithTag

Element getAncestorWithTag(HTML.Tag tag)
Finds a parent element matching the given tag.

Returns:
matching parent element, or null if no parent elements match.

Copyright (c) 2005-2012 Ephox Pty Ltd. All rights reserved.