Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Editor > RadEditor and Jquery Dialog

Answered RadEditor and Jquery Dialog

Feed from this thread
  • Gabriel Castillo avatar

    Posted on Feb 8, 2010 (permalink)

    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

    Reply

  • Gabriel Castillo avatar

    Posted on Feb 9, 2010 (permalink)

    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.

    Reply

  • Dobromir Dobromir admin's avatar

    Posted on Feb 9, 2010 (permalink)

    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.

    Reply

  • Gabriel Castillo avatar

    Posted on Feb 10, 2010 (permalink)

    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


    Reply

  • Answer Dobromir Dobromir admin's avatar

    Posted on Feb 10, 2010 (permalink)

    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.
    Attached files

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Editor > RadEditor and Jquery Dialog
Related resources for "RadEditor and Jquery Dialog"

ASP.NET Editor Features  |  Documentation  |  Demos  |  Step-by-step Tutorial  ]