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

Using RadEditor without a toolbar

5 Answers 1221 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Jerry
Top achievements
Rank 2
Jerry asked on 19 Feb 2009, 03:47 PM
I have been unable to find a satisfactory solution to using the RadEditor in preview mode without a toolbar. While I use the control on some pages for entering content, I have pages that also provide a read-only details view. I simply wish to provide the content for review, allow the user to scroll through the contents, but not show any toolbar. I have come close but a blank toolbar is always shown when the page renders.

Searching the forums and submitting support tickets has resulted in a few suggested solutions: including some style tags or using a ToolsFile.xml that has only <root></root> in it. Unfortunately these have not made any difference, I still get the exact same result. One suggestion is to disable the control which will cause RadEditor to display like a textbox. While this does work, it also eliminates the ability to scroll through the content.

My basic implementation consists of a ListView server control showing various data bound columns including the following:

                            <telerik:radeditor id="redBody" runat="server" Skin="Office2007" 
                                editmodes="Preview"  height="300px" ToolbarMode="ShowOnFocus"  
                                Content='<%# Eval("Body") %>'
                                width="100%">
                                <Tools><telerik:EditorToolGroup></telerik:EditorToolGroup></Tools>
                                <Modules>
                                    <telerik:EditorModule />
                                </Modules>                           
                            </telerik:radeditor>  

Again, I have tried adding a ToolsFile.xml with only <root></root>
I have tried several style suggestions found throughout the forums threads relating to hiding the toolbar. While no icons are shown in the toolbar, the empty toolbar is still visible.

It would make a lot of sense to me if there was a "None" or "Hidden" option available for the "ToolbarMode" attribute. If nothing else, I may have to create a custom Skin and try to fully hide the toolbar in that manner but I have not had time to try that yet.

Has anyone else ran into this or have any suggestions?

Thank you,
Jerry

5 Answers, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 23 Feb 2009, 03:22 PM
Hi Jerry,

If you simply need the user to be able to review/read/scroll the content, but do not want the user to edit it, perhaps the best and easiest option would be to set RadEditor1.Enabled  = false;

Have you tried that?

Best regards,
Tervel
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.
0
Jerry
Top achievements
Rank 2
answered on 23 Feb 2009, 03:37 PM
Hi Tervel,

Setting the RadEditor control's enabled to false gets me very close but it disables the scroll-bars. I am displaying email messages which can vary in length and would like the user to be able to scroll through the entire message contents yet not display a huge amount of information all at once.

I am getting the impression that others are not using the control in this manner. Maybe I need to rethink how I am going about this.

Thanks,
-Jerry

0
Tervel
Telerik team
answered on 25 Feb 2009, 02:03 PM
Hello Jerry,

In fact there is nothing wrong with the way you try to use RadEditor (except for that the scenario is less common than you assumed).
The issue you are facing has more to do with HTML and the way the browser parses and renders nested elements, rather than with the editor per ce.


I prepared a simple page for you that demonstrates four cases:

The test page has 4 div elements:

·         1st one has a child div with text inside it – shows default browser behavior

·         2nd one has a RadEditor inside it – when the editor is disabled shows default browser behavior

·         3rd one has a RadEditor inside it – when the editor is disabled (its height is set to 100%) doesn’t overflow its parent div

·         4th one has a RadEditor inside it – when the editor is disabled the parent div is set a style of overlow: auto

You can download the page from here:

Please examine each editor's settings and choose the one that is right for you.

Sincerely yours,
Tervel
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.
1
Sem
Top achievements
Rank 1
answered on 20 Dec 2012, 09:05 PM
Hi,

If this helps anyone this is what I did. I couldn't open the .zip file attached so I couldn't test that solution and the option to set Enabled to false (also know as scrollable non editable mode) wasn't feasible for my situation because I need to show html content. 

First, my ASP.NET and HTML code:

<div id="DivReadOnlyEditor">
    <telerik:RadEditor ID="RadEditor1" runat="server" Width="100%" Height="200" EditModes="Preview">
        <Tools>
            <telerik:EditorToolGroup />
        </Tools>
    </telerik:RadEditor>
</div>

and secondly, my css code:

#DivReadOnlyEditor .reToolbarWrapper
{
    display:none;
}


As an added note, I also agree that a "None" option for the "ToolbarMode" attribute would make a lot of sense.

Thanks,
Sem
0
Rumen
Telerik team
answered on 21 Dec 2012, 02:42 PM
Hi,

You can hide the toolbar using the following css class:

<style>
        .reToolCell
        {
            display: none;
        }
</style>


Regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Jerry
Top achievements
Rank 2
Answers by
Tervel
Telerik team
Jerry
Top achievements
Rank 2
Sem
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or