Set the Default Text of the Create Link Tool in the Editor to Https://

0 Answers 295 Views
Editor
Scott
Top achievements
Rank 1
Scott asked on 24 May 2021, 07:17 PM
In the editor, when you click create link it shows http in the text box. Our customer would like that to be https:// by default. How can I change this? I've using Tag Helpers.
Stoyan
Telerik team
commented on 27 May 2021, 12:06 PM | edited

Hi Scott,

In order to achieve this requirement I suggest subscribing to the Editor's Execute event:

<kendo-editor on-execute="execute">

</kendo-editor>
             

This will allow you to check whether the executed command's name is createLink and change the #k-editor-link-url inputs value:

function execute(e) {
    if (e.name === 'createlink') {
    setTimeout(function() {
      $('#k-editor-link-url').val("https://")
      });
    }
  }

I have applied  the above to this Dojo.

Scott
Top achievements
Rank 1
commented on 28 May 2021, 01:03 AM | edited

How would you do this with multiple editors on a page?
Stoyan
Telerik team
commented on 28 May 2021, 02:22 PM

Hello Scott,

To modify the #k-editor-link-url's default input for all the Editors on the page you need to subscribe to their execute event.

However if this is the only functionality provided by the execute's handler function you don't need to define it multiple times. Just pass the same handler function to all the Editors on the page.

I am attaching a screen capture that illustrates the above.

Please don't hesitate to reach out, if further questions occur.

 
Scott
Top achievements
Rank 1
commented on 28 May 2021, 03:08 PM

It works. Although it really ought to be a setting on the control or make it https since that's almost always what people are going to and should use. Thanks.
Stoyan
Telerik team
commented on 01 Jun 2021, 08:43 AM | edited

Hello Scott,

Indeed having the https by default makes sense. You can submit a Feature Request in our Feedback Portal. We follow the community interest in the Feature Requests to determine which features to implement in future releases.

Scott
Top achievements
Rank 1
commented on 11 Jun 2021, 05:34 PM

I've added a Feature Request. You can vote for it here: https://feedback.telerik.com/aspnet-core-ui/1522159-in-the-editor-the-add-link-dialog-should-use-https-rather-than-http
Stoyan
Telerik team
commented on 14 Jun 2021, 02:03 PM

Hi Scott,

Thank you for your request.

The feedback from our community helps us determine how to develop our products.

No answers yet. Maybe you can help?

Tags
Editor
Asked by
Scott
Top achievements
Rank 1
Share this question
or