Report an issue
Class

CKEDITOR.dom.elementPath

class

Retrieve the list of nodes walked from the start node up to the editable element of the editor.

Filtering

Properties

Methods

  • constructor( startNode, root ) → elementPath

    Creates an element path class instance.

    Parameters

    startNode : element

    From which the path should start.

    root : element

    To which element the path should stop, defaults to the body element.

    Returns

    elementPath
  • compare( otherPath ) → Boolean

    Compares this element path with another one.

    Parameters

    otherPath : elementPath

    The elementPath object to be compared with this one.

    Returns

    Boolean

    true if the paths are equal, containing the same number of elements and the same elements in the same order.

  • contains( query, [ excludeRoot ], [ fromTop ] ) → element

    Search the path elements that meets the specified criteria.

    Parameters

    query : String | Array | Function | Object | element

    The criteria that can be either a tag name, list (array and object) of tag names, element or an node evaluator function.

    [ excludeRoot ] : Boolean

    Not taking path root element into consideration.

    [ fromTop ] : Boolean

    Search start from the topmost element instead of bottom.

    Returns

    element

    The first matched dom element or null.

  • direction() → 'ltr' | 'rtl'

    Retrieve the text direction for this elements path.

    Returns

    'ltr' | 'rtl'
  • isContextFor( tag ) → Boolean

    Check whether the elements path is the proper context for the specified tag name in the DTD.

    Parameters

    tag : String

    The tag name.

    Returns

    Boolean