This is a migrated thread and some comments may be shown as answers.

RadEditor - Insert Link - Popup - Custom text

1 Answer 112 Views
Editor
This is a migrated thread and some comments may be shown as answers.
pradip
Top achievements
Rank 1
pradip asked on 27 Feb 2014, 10:33 AM
Hi

RadEditor - Click on Insert link - then popup is opening. We are trying to change popup header text from "Insert link" to something else. We tried using Javascript something like below on page load
function pageLoad(sender, args) {
                   $(".rwTitlebarControls em").text("new Text....");
    }


On first time click it is not showing required text. It works only on second time onward click. Please suggest solution

More info. - RadEditor is inside User Control which is getting loaded only when user drag it on page. It is on partial postback only. Attached doc has popup screen where highlighted text needs to be change.

Please suggest.

thanks,
Pradip

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 27 Feb 2014, 11:15 AM
Hello Pradip,

You should change the dialog's title using its Client-side API. Please follow this demo code:
<telerik:RadEditor runat="server" ID="RadEditor1"
    OnClientCommandExecuted="OnClientCommandExecuted">
    <Tools>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="InsertLink" />
        </telerik:EditorToolGroup>
    </Tools>
</telerik:RadEditor>
 
<script type="text/javascript">
    function OnClientCommandExecuted(editor, args) {
        var command = args.get_commandName();
        if (command === "InsertLink") {
            var dialog = editor.get_dialogOpener()._dialogContainers[command];
            dialog.set_title("Desired Title");
        }
    }
</script>

Regards,
Ianko
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Editor
Asked by
pradip
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or