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

The Autosize Feature of the Built-in Dialogs is Enabled

As of Q3 2013, the size of RadEditor dialogs is calculated via the Autosize feature of the RadWindow controls.

Since the Q3 2013 release, you can no longer set a custom size for the built-in dialogs using the DialogDefinitions class. For more information, see the "How to set a custom size for a dialog" section below.

Why Is This Change Necessary?

Telerik is changing how RadEditor dialogs resize for several reasons:

  • More consistent layout across the major browsers
  • Correct behavior and layout when different skins are being used
  • Improvement in the usability of the dialogs
  • Fixes, related to cross-browser issues.

How to Set a Custom Size for a Built-in Dialog

Programmatic approach

The example below shows how to resize the RadEditor's ImageProperties, SetLinkProperties and LinkManager dialogs:

    function OnClientCommandExecuting(editor, args) {
        if (editor.get_dialogOpener()) {
            var commandName = args.get_commandName();
            if (editor.get_dialogOpener()._getDialogContainer) {
                dialogReference = editor.get_dialogOpener()._getDialogContainer(commandName);
                setTimeout(function () {
                    if (commandName == "SetImageProperties") {
                    else if (commandName == "SetLinkProperties" || commandName == "LinkManager") {
                }, 2000);

<telerik:RadEditor ID="RadEditor1" runat="server" ExternalDialogsPath="~/EditorDialogs" OnClientCommandExecuting="OnClientCommandExecuting">
        <a href="">Google</a>
        <img src="Images/woolly-mc.png" />
        <br />

Alternative approach

You can set a custom size for a built-in dialog using additional CSS rules in their UserControl files. You should have already used the ExternalDialogsPath property to customize a built-in dialog. If you are not familiar with this approach, please examine the "ExternalDialogsPath property" article and the "Editor - Customize Built-in Dialogs" demo.

After following the steps provided in the Customize Built-in Dialogs demo you should implement the CSS rule. First add a <style> tag in the UC file. This rule should affect the body element of the document. Use a selector with higher CSS specificity than the default one and set the desired width and height attributes. For example, to resize the Document Manager you could use the following rule:

html.redDocumentManager body 
    width: 580px;
    height: 832px;

You should use the correct class name according to the dialog’s name. For convenience, you could follow this pattern:<DialogName> body

If you are using MetroTouch or BlackMetroTouch skin, you should use the following rule:<DialogName>.RadForm_<SkinName> body

You can also define the CSS rules in a separate file and point the DialogsCssFile property of the RadEditor control to it.With this approach, you will not be forced to manipulate the UC files and you can easily modify the sizes of the dialogs.You can find more information about this property in the "DialogsCssFile Property" article.

See Also

In this article