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

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

1 Answer 70 Views
Editor
This is a migrated thread and some comments may be shown as answers.
ido nahmias
Top achievements
Rank 1
ido nahmias asked on 09 Dec 2013, 08:57 AM
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).

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 11 Dec 2013, 07:16 PM
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.
Tags
Editor
Asked by
ido nahmias
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or