aspnetcore-js-devexpress-dot-richedit-dot-bookmarkcollection-1.md
A collection of Bookmark objects.
export class BookmarkCollection<TBookmark extends Bookmark> extends Collection<TBookmark>
| Name | Type | Description |
|---|---|---|
| TBookmark | Bookmark |
The type of bookmarks.
|
var bookmark = richEdit.document.bookmarks.find('bookmarkName')[0];
if (bookmark) {
var bookmarkInterval = bookmark.interval;
}
Collection<T> BookmarkCollection<TBookmark> BookmarkCollectionBase
Creates a bookmark with the specified interval and name.
create(
interval: IInterval,
name: string
): Bookmark
| Name | Type | Description |
|---|---|---|
| interval | IInterval |
An object that contains information about a text interval.
| | name | string |
The bookmark name.
|
| Type | Description |
|---|---|
| Bookmark |
The created bookmark.
|
var textInterval = richEdit.document.insertText(0, 'text');
var bookmark = richEdit.document.bookmarks.create(textInterval, 'bookmarkName');
Returns a list of bookmarks that meet the specified conditions.
find(
position: number | IInterval | IInterval[] | string | RegExp
): TBookmark[]
| Name | Type | Description |
|---|---|---|
| position | string | number |
A document position, interval, list of intervals, name, or regular expression.
|
| Type | Description |
|---|---|
| TBookmark[] |
A list of bookmarks.
|
var bookmark = richEdit.document.bookmarks.find('bookmarkName')[0];
if (bookmark) {
var bookmarkInterval = bookmark.interval;
}
richEdit.document.bookmarks.find(new DevExpress.RichEdit.Interval(48, 653)).forEach(
function(bookmark) {
console.log(bookmark.name);
}
);
See Also