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

Set a Custom Size for a Built-in Dialog of RadEditor

Environment

Product Version 2013.3
Product RadEditor for ASP.NET AJAX

Description

The solution below shows how to set a custom Size for a Built-in Dialog of RadEditor.

Solution

The var commandName = args.get_commandName(); line will return the command name of the opened dialog being ImageManager, LinkManager or another one, you can use it to add a check for the desired dialog you'd like to modify:

<script>
    function OnClientCommandExecuted(editor, args) {
        if (editor.get_dialogOpener()) {
            var commandName = args.get_commandName();

            if (editor.get_dialogOpener()._getDialogContainer) {
                dialogReference = editor.get_dialogOpener()._getDialogContainer(commandName);
                setTimeout(function () {
                    dialogReference.set_height("600px");
                    dialogReference.set_width("950px");

                }, 1000);

            }
        }
    }
</script>
<telerik:RadEditor ID="RadEditor1" runat="server"  OnClientCommandExecuted="OnClientCommandExecuted">
    <ImageManager ViewPaths="~/" />
</telerik:RadEditor>

See Also

In this article