Function rangeToLocal

  • Helper function to modify a range based on the context of the document. Returns range relative to the embedded section when the context is an embedded section, otherwise returns the range as is.

    Parameters

    • range: Range

      The range to modify.

    • context: DocumentContext

      The context of the document.

    Returns Range

    The modified range.