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

Gray are on RadEditor

4 Answers 63 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Erling Ervik
Top achievements
Rank 1
Erling Ervik asked on 11 Mar 2010, 03:22 PM
I have two radEditor on one content page. The markup for the first is:
            <telerik:RadEditor ID="reEditor" Width="965px" Height="225px"   
                EditModes="Design, Html" ToolsFile="~/BasicTools.xml" ToolbarMode="ShowOnFocus" ToolsWidth="450px"   
                EnableResize="False" OnClientLoad="OnClientLoad2" EnableViewState="False" runat="server" > 
                <ImageManager ViewPaths="~/pictures/" /> 
            </telerik:RadEditor> 
 
This editor is for editing content. The next edior is just for showing content written by an other user. The markup looks like this:
        <telerik:RadEditor ID="reDeveloper" Width="965px" Height="175px"   
            EditModes="Preview" ToolbarMode="ShowOnFocus" EnableResize="False" EnableViewState="False"   
            OnClientLoad="OnClientLoad" runat="server" ToolsWidth="10px">  
        </telerik:RadEditor> 
 
The functions OnClientLoad and OnClientLoad2 is like this:
<script type="text/javascript" > 
<!--  
    function OnClientLoad(editor, args) {  
        editor.get_toolContainer().style.display = 'none'; // Hide ToolBar  
    }  
 
    function OnClientLoad2(editor, args) {  
        var style = editor.get_contentArea().style;  
        style.fontFamily = 'Verdana';  
        style.fontSize = 13 + 'px';  
    }    
 
--> 
</script> 
When I run this page there is a gray area on the bottom of the readonly editor as shown in the enclosed attachement.
How do I get rid of it?

4 Answers, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 11 Mar 2010, 08:31 PM
For your second RadEditor control. If it's just for showing the content from the first one, you can just set Enabled="false" and it will only display the html markup without that gray bottom and you wouldn't need to hide the toolbar on the client-side when the editor loads. Although you would need to setup the border for the controls, in order for it to match the appearance you have right now.

I hope that helps.
0
Erling Ervik
Top achievements
Rank 1
answered on 12 Mar 2010, 08:28 AM
Yes, setting the enabled to false, removed the greay area at bottom, but now the text flows ut of the control, which is not what I want. (Se enclosed picture). The text should stay inside the radEditor area, with scrollbars to scroll the text inside.

Any other advice?
0
Rumen
Telerik team
answered on 12 Mar 2010, 05:31 PM
Hi Erling,

Set style="height:auto;" in the RadEditor declaration and delete the Height property. This should fix the problem. This attribute will be applied to the DIV displaying the content in non editable mode.



Best wishes,
Rumen
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
Erling Ervik
Top achievements
Rank 1
answered on 15 Mar 2010, 10:13 AM
Thanks.
I would never have gussed that.
Tags
Editor
Asked by
Erling Ervik
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
Erling Ervik
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or