New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Configure Hyperlink Manager URL field of RadEditor to starts with HTTPS


Product Version 2020.2.617
Product RadEditor for ASP.NET AJAX


Due to legacy reasons, the URL textbox begins with http://, but you can easily update it to https:// by following the instructions below.


To update the default value of the URL field of the Hyperlink manager from http:// to https://, you need to create a js file (e.g. dialog.js) with the following content:

setTimeout(function () {
    var urlField = document.getElementById("LinkURL");
    if (urlField.value.indexOf("https") || urlField.value.indexOf("http") > 0) {
        urlField.value = "https://";
}, 100);

and to load it through the DialogsScriptFile property

<telerik:RadEditor runat="server" ID="RadEditor1" DialogsScriptFile="~/dialog.js" ></telerik:RadEditor>

Solution 2

Use the OnClientCommandExecuted to access the HyperlinkManager dialog's contents and modify the LinkURL field value according to what's commining from the selection in the content area, e.g. if there is a selected URL it will stay untouched, if it is an empty selection the http:// protocol will be updated to https://, e.g.

<telerik:RadEditor runat="server" ID="RadEditor1" OnClientCommandExecuted="OnClientCommandExecuted"></telerik:RadEditor>
    function OnClientCommandExecuted(sender, args) {
        var dialogWindow,
            commandName = "LinkManager";

        dialogWindow = sender.get_dialogOpener()._dialogContainers[commandName];

        if (dialogWindow) {
            isIframe = dialogWindow.get_contentFrame();

            if (isIframe) {

    function setUrlProtocol(sender) {
        var urlField = sender.get_contentFrame().contentDocument.getElementById("LinkURL");

        if (urlField.value.indexOf("http://") >= 0 && urlField.value.substring(0).length == 7)  {
            urlField.value = "https://";
In this article