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

Disable Editor Rich Text Functionality

2 Answers 192 Views
Editor
This is a migrated thread and some comments may be shown as answers.
v.
Top achievements
Rank 1
v. asked on 15 Dec 2008, 03:59 PM
I'm wondering whether there's any way to disable all of the rich text functionality on the RadEditor, hide the menu entirely, and basically use it as a textarea (i.e. multiline textbox).  The reason I'm hoping to do this is that we use the RadEditor for our Memo fields in our solution, which do use rich text but would like to maintain a common look and feel in our multiline text fields, without permitting rich text to be entered or pasted there.  I figured out how to remove all of the menus so that there's nothing in the menu dropdown, and to strip formatting on paste, but the menu dropdown still appears, and keyboard commands such as Ctrl-B still cause the text entered to be formatted Bold...  so I'm wondering whether there's some other way to fully disable rich text.  Thanks!

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 18 Dec 2008, 12:08 PM
Hi Visar,

RadEditor is a rich text editor which uses the rich text editing engine of the browser and it is not possible to disable the formatting of its content area because this is not supported by the browser. If you would like you can display RadEditor as a TextBox and export its content as plain text via the Text property of the control, however you cannot disable the bold, italic and underline formatting since they can be applied by the browser shortcuts Ctrl+B, Ctrl+U and Ctrl+I.

Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
v.
Top achievements
Rank 1
answered on 19 Dec 2008, 08:07 PM
Thanks.  FYI, I acutally did figure out how to disable the Ctrl-B, Ctrl-I, Ctrl-U (by creating a javascript function to execute OnClientCommandExecuting with body "if (!oTool) return false;", and to make the box look like a textbox, but gave up on the idea for the following reasons:

- Making the box appear like a textbox required overriding a javascript function that runs onload of the page.  That function is already being used in my code, and needing to combine this command into that function would be a hassle
- Multi-Spaces and carriage returns also create HTML characters in the Telerik control (&nbsp;   <br>), and the carriage returns would have to be stripped out of the text for storage in the database AND loaded BACK into the text for Telerik display for the solution to work.  This seemed hokey.

So I just used a textarea instead.  Anyways, thanks for your help.
Tags
Editor
Asked by
v.
Top achievements
Rank 1
Answers by
Rumen
Telerik team
v.
Top achievements
Rank 1
Share this question
or