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

Make ShowOnFocus toolbar not resizable in runtime

1 Answer 37 Views
Editor
This is a migrated thread and some comments may be shown as answers.
QualiWareUA
Top achievements
Rank 1
QualiWareUA asked on 21 Aug 2008, 07:23 AM
I have a RadEditor with toolbar configured to be shown on focus. In this mode user can resize toolbar. Is there a way to prohibit this?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 21 Aug 2008, 12:12 PM
Hi Vladimir,

You can use the following code to get a reference to RadWindow ShowOnFocus toolbar and set its behavior to None, which will disable the resizing:

<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.set_behaviors(Telerik.Web.UI.WindowBehaviors.None);
       }, 300);
   });
}
</script>
<br /><br /><br /><br /><br /><br /><br />
<telerik:radeditor runat="server" ID="RadEditor1" ToolbarMode="showOnFocus" OnClientLoad="OnClientLoad">
</telerik:radeditor>

Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
QualiWareUA
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or