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

Remove Toolbar?

1 Answer 181 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Lenny_shp
Top achievements
Rank 2
Lenny_shp asked on 27 May 2009, 02:42 PM
Is there a way to remove the toolbar?   I just want to use the RadEditor as textbox with its AutoResizeHeight capability.

Currently I use a workaround of EmptyTools.xml, ToolsWidth of 1 px and ToolbarMode = PageTop.
It displays a slight border.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 01 Jun 2009, 06:04 AM
Hello Lenny_shp,

You can display RadEditor as a textbox and hide the pageTop toolbar using the following css classes and editor properties:

   <style type="text/css">  
    .RadWindow.RadWindow_Default.rwNormalWindow.rwTransparentWindow 
    { 
        display: none !important; 
    } 
    .RadEditor.Default.reWrapper   
    { 
        border: 1px solid black !important; 
    } 
     
    /* The following CSS needs to be copied to the page to produce textbox-like RadEditor */ 
    .reWrapper_corner, .reWrapper_center  
    { 
           display: none !important;                 
    } 
     
    .reLeftVerticalSide,  
    .reRightVerticalSide,  
    .reToolZone, 
    .reToolCell 
    { 
        background: white !important; 
    } 
     
    .reContentCell 
    { 
        border-width: 0 !important; 
    } 
     
    .RadEditor 
    { 
           filter: chroma(color=c2dcf0); 
    } 
    </style>  
    <telerik:RadEditor ID="RadEditor1" ToolbarMode="pageTop" runat="server" EditModes="design"  _AutoResizeHeight="true" width="300" Height="200"
        <Modules> 
            <telerik:EditorModule Name="fake" /> 
        </Modules> 
    </telerik:RadEditor>   

Please, note that I do not recommend setting the AutoResizeHeight property to "true" because RadEditor the code that sizes the content uses the toolbar height in the calculations and when the toolbar hidden a side effect appears in Firefox. For that reason it is better to not set the AutoResizeHeight property.

The example is based on this live demo: http://demos.telerik.com/aspnet-ajax/editor/examples/editorastextbox/defaultcs.aspx

All the best,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
Lenny_shp
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Share this question
or