Important changes to Tiny Cloud pricing > Find out more

NOTE: TinyMCE 5 reached End of Support in April 2023. No more bug fixes, security updates, or new features will be introduced to TinyMCE 5. We recommend you upgrade to TinyMCE 6 or consider TinyMCE 5 Long Term Support (LTS) if you need more time.

tinymce.dom.RangeUtils

This class contains a few utility methods for ranges.

Methods

name summary defined by
compareRanges() Compares two ranges and checks if they are equal. tinymce.dom.RangeUtils
getCaretRangeFromPoint() Gets the caret range for the given x/y location. tinymce.dom.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

Can't find what you're looking for? Let us know.

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.