All docs
V21.2
21.2
21.1
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.

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);
var text = 'Go to Google';
var url = 'https://www.google.com/';
var hyperlinkInfo = new DevExpress.RichEdit.HyperlinkInfo(text, url, undefined, 'tooltip');
richEdit.selection.activeSubDocument.hyperlinks.create(richEdit.selection.active, hyperlinkInfo);
var subDocument = richEdit.selection.activeSubDocument;
var currentPosition = richEdit.selection.active;
// Creates a bookmark at the current position
subDocument.insertText(currentPosition, 'Some text');
var interval = new DevExpress.RichEdit.Interval(currentPosition, 'Some text'.length);
var bkm = subDocument.bookmarks.create(interval, 'bkmName');
// Creates a hyperlink to the bookmark at the end of the active sub-document
var hyperlinkInfo = new DevExpress.RichEdit.HyperlinkInfo('Go to Bookmark', undefined, bkm.name, 'tooltip');
var hyperlink = subDocument.hyperlinks.create(subDocument.length - 1, hyperlinkInfo);