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

Using Editor Without Toolbars

5 Answers 319 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Teoman
Top achievements
Rank 1
Teoman asked on 28 Aug 2011, 06:39 PM
Hi,
I want to use radeditor like textarea.How can i remove all the toolbars in design mode?Can you help me please?
Thanks,

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 29 Aug 2011, 05:35 AM
Hello Teoman,

You can override the default CSS to hide toolbars in RadEditor.
CSS:
<style type="text/css">
 .reToolCell, .reLeftVerticalSide, .reRightVerticalSide
 {
  display:none !important;
 }
</style>

Thanks,
Princy.
0
Teoman
Top achievements
Rank 1
answered on 29 Aug 2011, 11:43 PM
hi princy i solved my problem with setting enableTextAreaMode=true.

But know i have another problem.I cant change the default font-name and size for content and words always underline red.

Can you help me about this topic please?
0
Accepted
Rumen
Telerik team
answered on 30 Aug 2011, 10:25 AM
Hi Teoman,

Note that when the EnableTextareaMode property is set to true, the editor is rendered as a standard textarea which offers only plain text support. Is this what you want to achieve?
If you want to style the textarea content area you can use the following ID class:

    <style type="text/css">
    #RadEditor1TextArea
    {
        font-family: Arial !important;
        font-size: 12px !important;
    }
    </style>
<telerik:RadEditor id="RadEditor1" EnableTextareaMode="true" runat="server"></telerik:RadEditor>

where the highlighted part of the class corresponds to the ID of RadEditor.

If you want however to have a rich text editor (EnableTextareaMode="false") without a toolbar, you can set the ToolsFile property to point to an XML file which contains only <root></root> tags. You can hide the borders of the control as shown in the following demo: Displaying RadEditor as a TextBox. You can see how to style the content area of the iframe based content area: Setting Content Area Defaults and Default Font for Editable Content.

Best regards,
Rumen
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Allen
Top achievements
Rank 2
Iron
Veteran
answered on 15 Nov 2015, 06:14 AM

What I need is a hybrid of a plain text area and the more complicated editor.  I am filling comment fields in a database that can only hold plain text, so the editor needs to edit only plain text, but still have spellchecking, undo, etc. etc. and, also  when I manipulate the contents to remove extraneous linefeeds and extra spaces witha  cleanup command, get the cleaned up value back inthe content area and show the corrected plain text with the new 'formatting' which is only line feeds, spaces, tabs etc.  Word wrap should be soft unless the user actually enters Ctl-enter or whatever.

So it looks like plain text with blank lines between, sometimes... example:

safasdfsdafsdf

asdfsdafsdafsdafdsf

asdfdfasdfdsf asdfdfaf sadffdfafa

asfdafafasd

asdf

1

2

3

 

 

0
Vessy
Telerik team
answered on 18 Nov 2015, 11:59 AM
Hi Allen,

The desired scenario can be achieved by configuring the Editor in a similar way:
  • Set its EditModes property to Design, so only the design view will be visible to the users
  • Set its NewLineMode property to "Br", so a Br element will be inserted on enter press and a P element - when Ctrl+enter is pressed
  • Configure the desired tools of the Editor through its Tools inner tag

For example:

<telerik:RadEditor ID="RadEditor1" runat="server" NewLineMode="Br" EditModes="Design">
    <Tools>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="Undo" />
            <telerik:EditorTool Name="Redo" />
            <telerik:EditorSeparator />
            <telerik:EditorTool Name="SpellCheck" />
        </telerik:EditorToolGroup>
    </Tools>
</telerik:RadEditor>

You can find more detailed information regarding the Editor's API in the following help article:
RadEditor Server-side Programming Overview


Regards,
Vessy
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Editor
Asked by
Teoman
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Teoman
Top achievements
Rank 1
Rumen
Telerik team
Allen
Top achievements
Rank 2
Iron
Veteran
Vessy
Telerik team
Share this question
or