MacRabbit

SXZoneTree

JavaScriptAPI : TextActionContext : SXZoneTree

SXZoneTree is an object available from the TextActionContext that allows you to lookup SXZone objects based on character index or range.

Read-only properties

  • rootZone: returns the root SXZone for this context

Methods

zoneAtCharacterIndex(location)

Returns the deepest SXZone at the zero-based character index location.

zonesInCharacterRange(range)

Returns an array of top-level SXZone objects that are completely contained within the Range range.

Note that returned zones may not share the same parent! Some zones might be deeper than others, because this method tries to find all zones inside the range.