aspnetcore-js-devexpress-dot-richedit-a1d8380f.md
An event that occurs when a hyperlink is clicked.
export class HyperlinkClickEvent extends RichEditEvent<HyperlinkClickEventArgs>
You can define the HyperlinkClick event handler either at the server side, at the client side, or at runtime.
Use the OnHyperlinkClick(String) method to specify the event handler.
@(Html.DevExpress().RichEdit("richEdit")
.OnHyperlinkClick("function(s,e) {
console.log('Navigates to ' + e.hyperlink.hyperlinkInfo.url);
}")
// ...
Use the hyperlinkClick property to specify the event handler.
const options = DevExpress.RichEdit.createOptions();
options.events.hyperlinkClick = function(s,e) {
console.log('Navigates to ' + e.hyperlink.hyperlinkInfo.url);
};
The hyperlinkClick property provides access to the addHandler(handler), removeHandler(handler), and clearHandlers methods that allow you to dynamically add and remove event handlers.
richEdit.events.hyperlinkClick.addHandler(function(s, e) {
console.log('Navigates to ' + e.hyperlink.hyperlinkInfo.url);
});
The event handler receives an argument of the HyperlinkClickEventArgs type. The argument’s properties provide information specific to this event.
Event<TSource, TEventArgs> RichEditEvent<TEventArgs> HyperlinkClickEvent
See Also