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 | The type of bookmarks. |
#Remarks
#Inheritance
#Methods
#create(interval, name) Method
Creates a bookmark with the specified interval and name.
#Declaration
#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
var textInterval = richEdit.document.insertText(0, 'text');
var bookmark = richEdit.document.bookmarks.create(textInterval, 'bookmarkName');
#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 | string | number | Reg |
A document position, interval, list of intervals, name, or regular expression. |
#Returns
Type | Description |
---|---|
TBookmark[] | A list of bookmarks. |