5 Answers, 1 is accepted
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.
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?
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 >>
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
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