Skip to main content
A newer version of this page is available. .

BookmarkCollection<TBookmark> Class

A collection of Bookmark objects.

Declaration

export class BookmarkCollection<TBookmark extends Bookmark> extends Collection<TBookmark>

Type Parameters

Name Type Description
TBookmark Bookmark

A bookmark object.

Remarks

richEdit.document.bookmarks.find('web_integration');

Inherited Members

Inheritance

Collection<T>
BookmarkCollection<TBookmark>

Methods

create(interval, name) Method

Creates a bookmark with the specified interval and name.

Declaration

create(
    interval: IInterval,
    name: string
): Bookmark

Parameters

Name Type Description
interval IInterval

An object that contains information about a text interval.

name string

The bookmark name.

Returns

Type Description
Bookmark

The created bookmark.

Remarks

richEdit.document.bookmarks.create({start: 38, length: 9},'Chapter1');

find(position) Method

Returns a list of bookmarks that meet the specified conditions.

Declaration

find(
    position: number | IInterval | IInterval[] | string | RegExp
): TBookmark[]

Parameters

Name Type Description
position number | IInterval | IInterval[] | string | RegExp

A document position, interval, list of intervals, name, or regular expression.

Returns

Type Description
TBookmark[]

A list of bookmarks.

Remarks

richEdit.document.bookmarks.find('web_integration');
richEdit.document.bookmarks.find({start: 48, length: 635});
See Also