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

Editor not resizing when disabled and AutoResizeHeight="true"

4 Answers 102 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Nate Pinchot
Top achievements
Rank 1
Nate Pinchot asked on 27 Oct 2008, 03:35 PM
Hello,
I have a RadEditor which I am filling with html content server side on the page initial load and I also disable it server side on page initial load so that it will show as a regular label. I have AutoResizeHeight="true" and I don't have a height set and the text inside of it is overlapping controls below it. Here is the code I am using. Please tell me what I am doing wrong.

        <div style="margin-bottom: 12px;"
            <div style="margin-bottom: 8px;"
                Describe the reason: 
                <asp:RequiredFieldValidator ID="rfvSituation" ControlToValidate="situation" runat="server" ErrorMessage="Please enter the reason.">*</asp:RequiredFieldValidator> 
            </div> 
            <telerik:RadEditor ID="situation" runat="server" ToolsFile="~/App_Data/RadEditor/BasicTools.xml" ContentAreaCssFile="~/css/RadEditorContentArea.css" Skin="Vista" Width="100%" EnableResize="true" AutoResizeHeight="true"
                <Content> 
                </Content> 
                <SpellCheckSettings DictionaryPath="~/App_Data/RadSpell" SpellCheckProvider="PhoneticProvider" DictionaryLanguage="en-US" /> 
            </telerik:RadEditor> 
        </div> 

4 Answers, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 28 Oct 2008, 11:24 AM
Hi Nate,

Please, review the following help article on the subject: Scrollable Non Editable Mode.

Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Nate Pinchot
Top achievements
Rank 1
answered on 30 Oct 2008, 04:19 AM
Thanks, that worked. It just didn't really give me exactly what I needed so I just hid the RadEditor and used a Literal in place of it. Thanks for your help!!
0
Paul Hopper
Top achievements
Rank 1
answered on 05 Dec 2008, 08:10 PM
I would like to vote for at least the option to not render a height when the editor is disabled.  This has been an issue for me for a long time now and, although I've been using the same workaround Nate is using, I don't see why it should be necessary.

I get why the control needs a default height when in edit mode.  I can see why someone might want to keep that height when not in edit mode.  What I don't get is why the control would still render a height when not in edit mode and AutoResizeHeight is set to true.
0
Rumen
Telerik team
answered on 08 Dec 2008, 12:26 PM
Hi Paul,

The AutoResizeHeight property works only when the editor is placed in editable mode and it resizes the editor's iframe. When the editor is put in non editable mode, the control is rendered as a div element displaying the produced content and the AutoResizeHeight does not work.

All you need to do in non editable mode to fix the reported problem is to set

style="height: auto;"  in the editor's declaration

<telerik:RadEditor ID="RadEditor1" Enabled="false" AutoResizeHeight="true"
style="height:auto">
</telerik:RadEditor>


Thus the editor's content will not overlap the control below it.

Kind regards,
Rumen
the Telerik team

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