Gray are on RadEditor

5 posts, 0 answers
  1. Erling Ervik
    Erling Ervik avatar
    9 posts
    Member since:
    Jan 2010

    Posted 11 Mar 2010 Link to this post

    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?

  2. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 11 Mar 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Erling Ervik
    Erling Ervik avatar
    9 posts
    Member since:
    Jan 2010

    Posted 12 Mar 2010 Link to this post

    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?
  5. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 12 Mar 2010 Link to this post

    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.
  6. Erling Ervik
    Erling Ervik avatar
    9 posts
    Member since:
    Jan 2010

    Posted 15 Mar 2010 Link to this post

    Thanks.
    I would never have gussed that.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017