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

RadEditor and Jquery Dialog

6 Answers 285 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Gabriel Castillo
Top achievements
Rank 1
Gabriel Castillo asked on 08 Feb 2010, 07:27 PM
Hi:
I am trying to use rad editor inside jquery dialog, but for one reason the editor looks to be disabled, I mean I am not able to type anything on it.

This is the code I am using:

 <script type="text/javascript">

            $(function() {
                // Dialog            
                $('#dialog').dialog({
                    autoOpen: false,
                    resizable: false,
                    width: 400
                });
         
            });

</script>  

...

<div id="dialog" title="Pharmacist's Comments" class="modal">                                            
    <telerik:RadEditor ID="RadEditor1" runat="server"  Width="100%" Height="300" >
    </telerik:RadEditor>                                                    
    <asp:TextBox runat="server" ID="txtTest1"  />
</div>   



Also, Is it possible when resizing the dialog the radeditor adjust its height and width accordingly?

Regards,
Gabriel

6 Answers, 1 is accepted

Sort by
0
Gabriel Castillo
Top achievements
Rank 1
answered on 09 Feb 2010, 12:16 PM
I have just realized that when I set autoOpen: true on the dialog, the RadEditor works well, but It will open the dialog as soon as the page loads, I need the user to click on a link to open the dialog.
0
Dobromir
Telerik team
answered on 09 Feb 2010, 01:45 PM
Hi Gabriel,

The problem occurs because the jQuery dialog is moving the RadEditor's element in the DOM and this causes the editor to lose its content or become uneditable. In order to fix this you have to fire the client-side method onParentNodeChanged() after the dialog('open') method.
Unfortunately, this does not solve this issue for Opera but we will do our best to fix this for one of the upcoming releases.

Regards,
Dobromir
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Gabriel Castillo
Top achievements
Rank 1
answered on 10 Feb 2010, 01:53 PM
Hi Dobromir,

Thanks for your reply, but Can you send me a code snippet of how to call that method you are describing? onParentNodeChanged(), what do I have to do when calling that method?

Regards,
Gabriel


0
Accepted
Dobromir
Telerik team
answered on 10 Feb 2010, 05:06 PM
Hi Gabriel,

I believe you are displaying the dialog by clicking on a link/button and you are calling $("#dialog").dialog('open'), so onParentNodeChanged() should be called right after that, e.g.:
$('#ShowDialog').click(function(event)
{
    //show dialog
    $("#dialog").dialog('open');
    setTimeout(function()
    {
        $find("<%=RadEditor1.ClientID%>").onParentNodeChanged();
    }, 10);
});
 
For your convenience I have attached a sample project that demonstrates this.

Greetings,
Dobromir
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Anandi
Top achievements
Rank 1
answered on 25 Apr 2017, 09:29 PM

Hi Dobromir,

I have the same problem, only my jquey dialog loads up a another page, and this child page contains the RAD editor. It is not editable now and the content is not loaded. So, how can I call OnParentNodeChanged while opening the dialog?

Thanks a lot.

Anandi

0
Rajeev Vachani
Top achievements
Rank 1
answered on 24 May 2017, 01:41 PM

Hi Dobromir,

I'm having a similar issue with v 2016.1.225.35. However, the issue is limited to Safari.

My RadEditor inside a DIV. The visibility of the DIV is toggled using a jquery dialog. When the dialog appears, the editor’s content is blank. I've tried firing onParentNodeChanged() to no avail.

Tags
Editor
Asked by
Gabriel Castillo
Top achievements
Rank 1
Answers by
Gabriel Castillo
Top achievements
Rank 1
Dobromir
Telerik team
Anandi
Top achievements
Rank 1
Rajeev Vachani
Top achievements
Rank 1
Share this question
or