This is a migrated thread and some comments may be shown as answers.
RadEditor dialogs in iframe
3 Answers 4 Views
This is a migrated thread and some comments may be shown as answers.
Ivan
Top achievements
Rank 1
Ivan asked on 02 Jul 2020, 05:36 PM

Hi.

We have a page with RadEditor placed into an iframe. Opening dialog when a size of dialog is bigger than the size of iframe looks not good (radwindow-dialog.png).
We tried to use browser modal dialog by calling client-side function set_useClassicDialogs(true). In this case, the popup dialog is smaller than the content and we need to scroll or maximize the window (browser-modal-dialog.png).

We use 2020.1.219.35 version.

Any suggestions to get auto-resized dialog over iframe would be much appreciated.

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 03 Jul 2020, 08:27 AM

Hi Ivan,

As you know the iframe is like a browser window in the browser and it is not possible to open HTML elements from outside the iframe. That's why the set_useClassicDialogs(true) is suitable for this scenario since the editor will use browser dialogs which are window dialog which can be loaded from outside the iframe.

The only thing you need to configure is the Table Wizard dialog dimensions with the help of the code below:

        <telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="OnClientLoad">
        </telerik:RadEditor>
        <script type="text/javascript">
            function OnClientLoad(editor, args) {
                editor.set_useClassicDialogs(true);
                var dialogOpener = editor.get_dialogOpener();

                dialogOpener.get_dialogDefinitions()["TableWizard"].Width = "860px";
                dialogOpener.get_dialogDefinitions()["TableWizard"].Height = "650px";
            }
        </script>

 

Regards,
Rumen
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Ivan
Top achievements
Rank 1
answered on 05 Jul 2020, 08:44 PM
Thanks Rumen for your reply. We have implemented this solution.
0
Rumen
Telerik team
answered on 06 Jul 2020, 05:36 AM

You are welcome, Ivan. Have a productive week ahead!

 

Best Regards,
Rumen
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Asked by
Ivan
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Ivan
Top achievements
Rank 1
Share this question
or