The requested page is not available for the requested platform. You are viewing the content for Default platform.

BookmarkCollection<TBookmark> Class

A collection of Bookmark objects.

Declaration

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

Type Parameters

Name Description
TBookmark

A bookmark object.

Remarks

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

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});