Remove Hyperlink command

1 Answer 24 Views
RichTextBox
Dat
Top achievements
Rank 1
Dat asked on 04 Oct 2021, 07:08 AM
Hello Telerik team , I has used ShowInsertHyperLinkCommand and RemoveHyperlinkCommand to deal with hyperlink , but when I double click to select ranges of text, RemoveHyperlinkCommand make my button disable. It seem like only when I single click and cursor in single selection then Remove button enabled. How can I deal with selection range to RemoveHyperlinkCommand ?

1 Answer, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 06 Oct 2021, 09:42 AM

Hello Dat,

All the commands that modify fields (including hyperlinks) can be executed only when the selection is empty. This is a core logic of a base class and cannot be modified through the public API. What I can suggest if you would like to remove hyperlinks on selection is to implement the desired logic for the specific button and iterate through the elements inside the selection to check them for hyperlinks.

Hope this is helpful.

Regards,
Tanya
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
RichTextBox
Asked by
Dat
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Share this question
or