All docs
V20.2
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

Related members: hyperlinks, Hyperlink, hyperlinkInfo

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

Related members: hyperlinkInfo, create(position, hyperlinkInfo),

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);

Related members: insertText(position, text), Interval, create(interval, name), hyperlinkInfo, create(position, 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);