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

[Solved] Radeditor setSize

3 Answers 221 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Andreas Karpinski
Top achievements
Rank 1
Andreas Karpinski asked on 28 Sep 2009, 04:35 PM
Dear all,
i've got a problem.
I have got a Rad Window with a rad  editor now i want that the radeditor is always 100% in width and height. Also when i resize the radwindow.

I hope you can help me.

And sorry for my broken english ;)

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 01 Oct 2009, 08:54 AM
Hi Andreas,

RadEditor for ASP.NET AJAX does not offer support for height set in percents and to achieve your scenario you should write client-side code.  Here is a base example on how to proceed:

 
<script type="text/javascript">  
function OnClientLoad(editor, args)  
{  
    editor.setSize(document.documentElement.offsetWidth + "px",document.documentElement.offsetHeight + "px");  
}  
</script>  
<telerik:RadEditor ID="RadEditor1" OnClientLoad="OnClientLoad" runat="server"></telerik:RadEditor>    


Greetings,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Andreas Karpinski
Top achievements
Rank 1
answered on 01 Oct 2009, 09:51 AM
Thank you!

Now there is an other problem.

I'm resizing a Radwindow always to 90 % of the client Height/Width. But the modal isn't resizing ... it gets larger but not smaller.

Same problem like here:
http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultcs.aspx

If you start this in fullscreen and then you change the size of the editor the modal isn't scaling ...
0
Rumen
Telerik team
answered on 06 Oct 2009, 11:21 AM
Hello Andreas,

The editor wont become smaller because its wrapper has minWidth and minHeight properties set. In addition to the setSize method, you should also set

var elem = editor.get_element();
elem.style.minWidth = "";
elem.style.minHeight = "";

If you need further help, please open a support ticket and send a fully working project that demonstrates the problem.

All the best,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
Andreas Karpinski
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Andreas Karpinski
Top achievements
Rank 1
Share this question
or