


var elem = editor.getSelectedElement();
.
.
var
insertLinkCallBack = function(sender, args) {
editor.pasteHtml(
"<a href=\"" + args.href + "\">" + args.html+ "</a>");
}
When I select a piece of text wrapped in <div> the pasted html is wrapped the div twice (?)
Before paste:
<div id="myid">my content<br />
<br /></div>
After paste:
<div id="myid"> <a href="http://mylink">
<div id="myid">my content<br />
<br />
</div></a></div>

<telerik:RadToolBar ID="ProductFindViewRadToolBar" OnButtonClick="ProductFindRadToolBar_ButtonClick" OnClientLoad="FocusFindTextBox" Runat="server" CausesValidation="false" >
<Items>
<telerik:RadToolBarButton id="ProductFindViewRadToolBarTextBoxButton" CausesValidation="false" Value="TextBox">
<ItemTemplate>
<div style="padding:0 0 0 5px">
<asp:TextBox ID="ProductFindTextBox" Width="250px" onkeydown="OnEnterKeyDown()" runat="server" />
<asp:Label ID="WarningLabel" CssClass="GenericAlertMessage" runat="server" Text="" Width="0" /></div>
</ItemTemplate>
</telerik:RadToolBarButton>
<telerik:RadToolBarButton Text="Find Now" ToolTip="Find Now" id="ProductFindViewRadToolBarFindButton"></telerik:RadToolBarButton>
</Items>
</telerik:RadToolBar>
function FocusFindTextBox() {
var toolBar = $find("<%= ProductFindViewRadToolBar.ClientID %>"); //Good Object
var button = toolBar.findItemByValue("TextBox") //Good Object
var textBox = button.findControl("ProductFindTextBox"); //NULL EVERY TIME
alert(textBox);
}