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

RadEditor ContentArea Height

6 Answers 140 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Jai
Top achievements
Rank 1
Jai asked on 08 Jun 2011, 08:44 AM
Hi,

I am using this RadEditor and I found that the Editor ContentArea height is little bit more than what i wants. I tried to set the height but no effects. Please the attached screenshot. And let me know how can i do that.

Thanks,
--Jai

6 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 10 Jun 2011, 12:25 PM
Hello Jai,

Please, make sure that you are using the latest version of RadEditor for ASP.NET AJAX (Telerik.Web.UI.dll v2011.1.519) in your project. Remove your page stylesheet and themes and test again the editor.

If you would like you can get reference to the content area using JavaScript

var content area = editor.get_contentArea();

and apply a new height using

editor.get_contentArea().style.height = "200px";

Best regards,
Rumen
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Matt
Top achievements
Rank 1
answered on 25 Apr 2014, 02:54 PM
I know this is old but I can't find a realistic demo or working example on how to make this work. I'm using the latest (2014).

var editor = $find("<%=RE_ChangeComments.ClientID%>");
editor.get_element().style.height = "200px";
editor.get_contentArea().style.height = "200px";

Both of these only seem to change the "border" height of the editor. setSize() only seems to work for OnClientLoad, how can I simply change the height of an editor from another control like a RadComboBox??
0
Ianko
Telerik team
answered on 28 Apr 2014, 11:07 AM
Hello Matt,

Due to improvements done to the Editor's layout and resize logic, programmatically changes to the size should be done via the setSize().

I would like also to note that if the editor is set to a height that is less than the initially set one, the editor layout will break and in such scenarios I would suggest further setting that table element, structuring the control elements with the same size.

For example:
<telerik:RadEditor runat="server" ID="RadEditor1" Height="400">
</telerik:RadEditor>
 
<telerik:RadButton runat="server" ID="RadBtn1" AutoPostBack="false"
    Text="Change Size" OnClientClicked="changeEditorSize"></telerik:RadButton
 
<script type="text/javascript">
    function changeEditorSize(sender, args) {
        var editor = $find("<%= RadEditor1.ClientID %>");
        // Getting the already set editor width
        var width = editor.get_element().style.width;
        // Using the setSize() method to resize the editor
        editor.setSize(width, "200px");
        // Setting the same size to the table element
        editor.get_mainTable().style.height = "200px";
    }
</script>


Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Chakradhar
Top achievements
Rank 1
Veteran
Iron
answered on 11 Sep 2020, 01:30 PM

Hi, 

Is there any way i can auto adjust RadEditor width

0
Chakradhar
Top achievements
Rank 1
Veteran
Iron
answered on 11 Sep 2020, 01:32 PM

Hi is there any way that i can adjust RadEditor width similar to 
 AutoResizeHeight="true"

If we enter text with out enter it should keep on increase the width

 

0
Rumen
Telerik team
answered on 11 Sep 2020, 02:07 PM

Hi Chakradhar,

You can set the Width property value in percent, e.g. Width="100%".

 

Regards,
Rumen
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Tags
Editor
Asked by
Jai
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Matt
Top achievements
Rank 1
Ianko
Telerik team
Chakradhar
Top achievements
Rank 1
Veteran
Iron
Share this question
or