Back to Devexpress

HyperlinkInfo Class

aspnetcore-js-devexpress-dot-richedit-68f3bb85.md

latest2.4 KB
Original Source

HyperlinkInfo Class

Contains information about a hyperlink.

Declaration

ts
export class HyperlinkInfo

Remarks

javascript
var text = "Visit our site";
var url = "https://www.devexpress.com/";
var tooltip = "DevExpress site";

richEdit.beginUpdate();
richEdit.history.beginTransaction();
var subDocument = richEdit.selection.activeSubDocument;

var position = richEdit.selection.active;
position = subDocument.insertParagraph(position).interval.end;
position = subDocument.hyperlinks.create(position, new DevExpress.RichEdit.HyperlinkInfo(text, url, "", tooltip)).interval.end;
subDocument.insertParagraph(position);

richEdit.endUpdate();
richEdit.history.endTransaction();

constructor(text)

Initializes a new instance of the HyperlinkInfo class with specified settings.

Declaration

ts
constructor(
    text: string,
    url?: string,
    bookmark?: string,
    tooltip?: string
)

Parameters

NameTypeDescription
textstring

The hyperlink text.

| | url | string |

The hyperlink URL.

| | bookmark | string |

The name of a bookmark to which the hyperlink navigate.

| | tooltip | string |

The hyperlink tooltip text.

|

Properties

bookmark Property

The name of a bookmark to which the hyperlink navigate.

Declaration

ts
bookmark: string

Property Value

TypeDescription
string

A bookmark name.

|

Remarks

If the bookmark property is specified, the url property is not in effect.

text Property

Specifies the hyperlink text.

Declaration

ts
text: string

Property Value

TypeDescription
string

The hyperlink text.

|

tooltip Property

Specifies the hyperlink tooltip text.

Declaration

ts
tooltip: string

Property Value

TypeDescription
string

The tooltip text.

|

url Property

Specifies the hyperlink URL.

Declaration

ts
url: string

Property Value

TypeDescription
string

The hyperlink URL.

|

Remarks

If the bookmark property is specified, the url property is not in effect.