Customize dialog for the Insert Link tool in Editor

1 Answer 50 Views
Editor ToolBar
Joe
Top achievements
Rank 1
Iron
Iron
Joe asked on 20 Nov 2023, 07:59 PM

I'm using the Kendo Angular editor in my application and am wondering if there is a way to customize the Insert Link directive that is used by default? The dialog is working fine but I need to enforce that users prefix the URL with (http:// or https://).

I have looked through all the documentation I can find and am unable to find a way to alter it for Angular.

Alternatively is there an event that can be hooked into once the dialog is closed to do the validation there?

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Accepted
Martin
Telerik team
answered on 23 Nov 2023, 03:18 PM

Hi Joe,

The default Create Link tool does not support a template for customizing the content of the Dialog. However, the desired modifications could be achieved with some custom JavaScript logic. Let me explain in detail the steps required for each customization.

So far there is no built-in mechanism for checking the pasted links and editing the protocol. However, the developer can manually set control the web address value or the placeholder by handling the click event of the Create Link button and with some custom JavaScript logic Here is an example:

https://stackblitz.com/edit/angular-sahon5?file=src%2Fapp%2Fapp.component.ts

I hope this helps to move forward. Let me know if there is anything else I can help with.

Regards,
Martin
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
Editor ToolBar
Asked by
Joe
Top achievements
Rank 1
Iron
Iron
Answers by
Martin
Telerik team
Share this question
or