New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Reposition the ShowOnFocus toolbar of RadEditor on show


Reposition the ShowOnFocus toolbar of RadEditor on show


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);
<telerik:RadEditor runat="server" ID="RadEditor1" ToolbarMode="showOnFocus" OnClientLoad="OnClientLoad">
In this article
Not finding the help you need? Improve this article