tinymce.dom.RangeUtils

This class contains a few utility methods for ranges.

Summary

Methods

Name Summary Defined by

compareRanges()

Compares two ranges and checks if they are equal.

RangeUtils

getCaretRangeFromPoint()

Gets the caret range for the given x/y location.

RangeUtils

Methods

compareRanges()

compareRanges(rng1: RangeObject, rng2: RangeObject): Boolean

Compares two ranges and checks if they are equal.

Parameters

  • rng1 (RangeObject) - First range to compare.

  • rng2 (RangeObject) - First range to compare.

Return value

  • Boolean - True or false if the ranges are equal.


getCaretRangeFromPoint()

getCaretRangeFromPoint(clientX: Number, clientY: Number, doc: Document): Range

Gets the caret range for the given x/y location.

Parameters

  • clientX (Number) - X coordinate for range

  • clientY (Number) - Y coordinate for range

  • doc (Document) - Document that the x and y coordinates are relative to

Return value

  • Range - Caret range