Skip to main content
cut

RichEditCommands.changeHyperlink Property

Gets a command that changes the specified hyperlink.

Declaration

readonly changeHyperlink: ChangeHyperlinkCommand

Property Value

Type Description
ChangeHyperlinkCommand

An object that provides methods that execute the command and check its state.

Remarks

Call the execute(fieldIndex, hyperlinkSettings) method to invoke the command. The method checks the command state (obtained via the getState method) to determine whether the action can be performed.

var field = richEdit.document.activeSubDocument.findFields(richEdit.selection.intervals[0].start)[0];
if (field && field.isHyperlink){
    var hyperlinkSettings = new ASPx.HyperlinkSettings ("google.com", "", "click me", "go to google");
    richEdit.commands.changeHyperlink.execute(field.index, hyperlinkSettings);
}

Use the Field.isHyperlink property to determine whether the specified field is a hyperlink.

Refer to the following section for more information: Client Commands.

See Also