Community & Support
Home / Community & Support / Knowledge Base / RadControls for ASP.NET and ASP.NET AJAX / Editor / Reposition the ShowOnFocus toolbar of RadEditor on show

Reposition the ShowOnFocus toolbar of RadEditor on show

Article Info

Rating: Not rated

Article information

Article relates to

 Telerik.Web.UI 2008.2.723+

Created by

 Rumen Zhekov

 Last Modified
 2010/05/03
 Modified by
 Dobromir Semenliev

HOW-TO
Reposition the ShowOnFocus toolbar of RadEditor on show

SOLUTION
The code below demonstrates how to attach a click eventhandler to the editor's content area and get a reference to the RadWindow based ShowOnFocus toolbar. In order to set the required new position use the RadWindow's client method moveTo(), e.g.
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
<script type="text/javascript">
    function OnClientLoad(editor, args)
    {
        var element = document.all ? editor.get_document().body : editor.get_document();
        $telerik.addExternalHandler(element, "click", function (e)
        {
            setTimeout(function ()
            {
                var oWnd = editor.get_toolAdapter().get_window(); //get reference to RadWindow based ShowOnFocus toolbar 
                oWnd.moveTo(695, 14);
            }, 0);
        });
    
</script>
<telerik:RadEditor runat="server" ID="RadEditor1" ToolbarMode="showOnFocus" OnClientLoad="OnClientLoad">
</telerik:RadEditor>

Comments

There are no comments yet.
If you'd like to comment on this KB article, please, send us a Support Ticket.
Thank you!

Please Sign In to rate this article.