How can I edit hyperlink in SfRichTextBoxAdv from code?

SfRichtextBoxAdv, v19.2.0.55

I find the sfrichtextboxadv control has a "Edit Hyperlink" context menu which works great.

But I have some biz logic I have to do every time a hyperlink is inserted or edited (kind like a wiki). I managed to use the "InsertHyperlinkCommand" to insert a new link into the document. But I didn't find a "EditHyperlinkCommand" that I can utilize to edit a hyperlink in the document. The "HyperlinkClicked" event in the api is not available in VS.

Please tell me how to edit a hyperlink from code.

Thank you.


2 Replies

KG Kalaivannan Ganesan Syncfusion Team August 19, 2021 01:26 PM UTC

Hi Carlos,

Thanks for contacting Syncfusion support.

InsertHyperlinkCommand can be used for both insert and edit hyperlinks. When the InsertHyperlinkCommand is performed on selecting the normal text, a new hyperlink will be inserted with the command’s parameters. If it is executed on selecting an existing hyperlink, it will modify that hyperlink with the new command’s parameters(URL Display Text, and ScreenTip).

Also, we have created a sample to demonstrate the same which can be downloaded from the below location
https://www.syncfusion.com/downloads/support/forum/168184/ze/HyperlinkEditCommand930417990

Please refer to the below link to know more about the hyperlink request navigation event
https://help.syncfusion.com/wpf/richtextbox/hyperlink#hyperlink-navigation
 

Please let us know if you have any other questions.

Regards,
Kalaivannan Ganesan
 



CA Carlos replied to Kalaivannan Ganesan August 20, 2021 12:36 AM UTC

Thank you for the help, I'll give it a try.


Loader.
Up arrow icon