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

What event is fired on resize?

2 Answers 104 Views
Editor
This is a migrated thread and some comments may be shown as answers.
msigman
Top achievements
Rank 2
msigman asked on 19 Jul 2010, 08:16 PM
I would like to prevent the RadEditor from being expanded horizontally (though vertical is okay).  I thought the best way to do this is intercept some OnResize() event and then force the width to a predefined size.  But I can't find which event is fired when the control is resized.  Can anyone help, or suggest another way to achieve the same functionality?  Thanks.

2 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 22 Jul 2010, 03:19 PM
Hi Matthew,

RadEditor does not offer OnResize client-side event. However, it has OnResizeStart() and OnResizeEnd() which control this functionality.You can extend those methods to match the requested feature, e.g.

Copy Code
<telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="OnClientLoad">
</telerik:RadEditor>
  
<script type="text/javascript">
    function OnClientLoad(editor, args) {
        var oldOnResizeEnd = editor.onResizeEnd;//store the old function
        editor.onResizeEnd = function() {
            eval(oldOnResizeEnd);//execute the old function
            alert(editor.get_element().offsetWidth); 
        };
    }
</script>

I hope this information helps.

Sincerely yours,
Dobromir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
msigman
Top achievements
Rank 2
answered on 22 Jul 2010, 05:18 PM
This worked great, thank you!
Tags
Editor
Asked by
msigman
Top achievements
Rank 2
Answers by
Dobromir
Telerik team
msigman
Top achievements
Rank 2
Share this question
or