Skip to main content
All docs
V18.2

SubDocument.findBookmarks(position) Method

Returns an array of bookmarks whose range intersects the specified intervals in the sub-document.

Declaration

findBookmarks(
    position: number | Interval | Interval[] | string | RegExp
): Bookmark[]

Parameters

Name Type
position number | Interval | Interval[] | string | RegExp

Returns

Type Description
Bookmark[]

An array of the Bookmark objects representing bookmarks whose range intersects the specified intervals in the sub-document.

Remarks

The interval intersects a range if they include at least one common element. If a document’s object has zero length range and its start position is included in the specified interval(s), the method includes the object in the result array.

You can use this overload or the overload with the interval parameter to pass the current selection to the method.

See Also