aspnetcore-js-devexpress-dot-richedit-dot-collection-1.md
Serves as a base for classes maintaining a collection of items.
export abstract class Collection<T>
| Name | Description |
|---|---|
| T |
The type of items.
|
Collection<T> FontCollection
Gets the number of items contained in the collection.
get count(): number
| Type | Description |
|---|---|
| number |
The number of items.
|
Gets an item with the specified index.
getByIndex(
index: number
): T | null
| Name | Type | Description |
|---|---|---|
| index | number |
The index of an item in the collection.
|
| Type | Description |
|---|---|
| T |
An object that is the item at the specified index. null if an item with the specified index is not found.
|
// Gets URLs of all hyperlinks in the main sub-document
var hyperlinks = richEdit.document.hyperlinks;
var hyperlinkUrls = [];
for(var i = 0, hyperlink; hyperlink = hyperlinks.getByIndex(i); i++)
if (hyperlink.hyperlinkInfo.url)
hyperlinkUrls.push(hyperlink.hyperlinkInfo.url);