InspectDocumentSelection extension
- on
Methods
-
doesSelectionContainPosition(
DocumentSelection selection, DocumentPosition position) → bool -
Returns
true
if, and only if, the givenposition
sits within the givenselection
in thisDocument
. -
getNodesInContentOrder(
DocumentSelection selection) → List< DocumentNode> -
Returns a list of all the
DocumentNodes
within the givenselection
, ordered from upstream to downstream. -
selectDownstreamPosition(
DocumentPosition docPosition1, DocumentPosition docPosition2) → DocumentPosition -
Given
docPosition1
anddocPosition2
, returns theDocumentPosition
that appears last in the document. -
selectUpstreamPosition(
DocumentPosition docPosition1, DocumentPosition docPosition2) → DocumentPosition -
Given
docPosition1
anddocPosition2
, returns theDocumentPosition
that appears first in the document.