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

Editor height mishandled on Firefox

1 Answer 132 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Lerac
Top achievements
Rank 1
Lerac asked on 07 Mar 2008, 06:49 PM
The heigth attributes appears to be mishandled on Firefox.

Setting attribute Height anything < 34 result in an editor with a 0 height content area. Setting Height anywhere from 35 to > 60 results in an editor with content area height ~151 px

Trying the solution suggested by post:
http://www.telerik.com/community/forums/thread/b311D-batgkk.aspx

Generates a Javascript error: resizer has no properties

This is a critical issue for any form where widget size must be controlled precisely to conform to the expected layout.

Is there a means to control the height of the editor in a predictable and exact manner?

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 10 Mar 2008, 12:46 PM
Hi Lerac,

This Height problem is due to  a well known issue / bug in the Mozilla browser, and not in r.a.d.editor. The browser itself ignores setting any heights smaller than 150px to the IFRAME element.

Here is a small sample that shows the root of the problem:

<table style="height:80px;border:3px solid green">  
    <tr style="height:100%">  
        <td style="height:100%">  
            <iframe style="border: 1px solid red; height:100%" src=""></iframe> 
        </td> 
    </tr> 
</table> 

As you can see, there is no r.a.d.editor here. Just a simple table with an iFrame in it. Check how it will look like under IE and Firefox.

The good news is that you can fix this browser problem by using the RadEditor's Client-Side API. The following code will show you how to set the editor Height to 50 px in IE and Firefox:


<script type="text/javascript">
function SetCorrectSize(editor, args)
{                   
    window.setTimeout(function()
        {
            var editorIframe = $get("RadEditor1Wrapper").getElementsByTagName("iframe")[0];
            editorIframe.style.height = "50px";
            editor.setSize(350, 50);
       },100);

</script>
<telerik:RadEditor ID="RadEditor1" Height="50px" OnClientLoad="SetCorrectSize" runat="server">
  <Tools>
    <telerik:EditorToolGroup>
        <telerik:EditorTool Name="Bold" />
        <telerik:EditorTool Name="Italic" />
        <telerik:EditorTool Name="Underline" />
    </telerik:EditorToolGroup>
  </Tools>
  <Modules>
    <telerik:EditorModule Name="RadEditorStatistics" />
  </Modules>
</telerik:RadEditor>


Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
Lerac
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or