Skip to main content

RichEditCommands.changeHyperlink Property

Gets a command that changes the specified hyperlink.


readonly changeHyperlink: ChangeHyperlinkCommand

Property Value

Type Description

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


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 ("", "", "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