Can't add text inside Radeditor (Design) in IE 9, 10 after re-appending radedtior to a new div

2 posts, 0 answers
  1. ido nahmias
    ido nahmias avatar
    64 posts
    Member since:
    May 2006

    Posted 09 Dec 2013 Link to this post

    Can't add text inside Radeditor (Design) in IE 9, 10 after re-appending radedtior to a new div 

    Scenario to reproduce:

     <div id="prev"><telerik:RadEditor ID="RadEditor1" runat="server" ></telerik:RadEditor></div>
            
     <div style="height:200px;">some text...</div>

     <div id="next"></div>

     <div id="btn">click</div>

      <script type="text/javascript">
            $(function () {
                $("#btn").click(function(){
                    $("#next").append($("#prev"));
                });
            });
        </script>



    1. After clicking on "click" (button), the div (id="prev") which contains the editor is being append to div (id="next") (according to jquery script).
    2. It's impossible to add text inside the editor (Design) in IE 9,10 (it works fine in chrome).
  2. Ianko
    Admin
    Ianko avatar
    1940 posts

    Posted 11 Dec 2013 Link to this post

    Hi Ido,

    The RadEditor control rendering depends on the initially set wrapper element and its position in the DOM. In scenarios in which the editor is moved dynamically or initially hidden, we always recommend  implementing further the customization, so that the onParentNodeChanged() method of the editor is invoked.

    Please follow this example setup, which should be working as expected:
    <div id="prev">
                <telerik:RadEditor ID="RadEditor1" runat="server"></telerik:RadEditor>
            </div>
     
            <div style="height: 200px;">some text...</div>
     
            <div id="next"></div>
     
            <div id="btn">click</div>
     
            <script type="text/javascript">
                $telerik.$(function () {
                    $telerik.$("#btn").click(function () {
                        $telerik.$("#next").append($telerik.$("#prev"));
                        $find("<%= RadEditor1.ClientID %>").onParentNodeChanged();
                    });
                });
            </script>


    Regards,
    Ianko
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top