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

Hyperlink Class

Defines a hyperlink in the document.

Declaration

export class Hyperlink extends Field

Remarks

richEdit.selection.goToSubDocumentEnd();
richEdit.document.insertParagraph(richEdit.selection.active);
richEdit.document.hyperlinks.create(richEdit.selection.active+1, {text: "Visit our site", tooltip: "DevExpress site", url: "https://www.devexpress.com/"})

Inheritance

Field
Hyperlink

Properties

Provide access to information about a hyperlink.

hyperlinkInfo: HyperlinkInfo
Type Description
HyperlinkInfo

An object that contain information about a hyperlink.

//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);
See Also