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

How to customize RadEditor appearnce when disabled

2 Answers 122 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Randall
Top achievements
Rank 2
Randall asked on 30 Jul 2008, 08:59 PM
Hello,

I have RadEditor (Q2 2008 version 2008.1 619) and I want to know how to customize the appearance of the RadEditor when it is disabled.  When enabled, the RadEditor displays as normal, but when disabled, just the contents are displayed.

Can you tell me how to display the contents of the disabled RadEditor with a border and specific background color?

Thanks,

Randall Price

2 Answers, 1 is accepted

Sort by
0
Todd Anglin
Top achievements
Rank 2
answered on 31 Jul 2008, 01:01 AM
Randall-

When the RadEditor is disabled, the content is rendered inside of a plain old HTML DIV tag. You can style this DIV tag however you like by adding CSS style rules to the DIV tag at run time. To do that, simply locate the DIV tag via the RadEditor client side ID and then use JavaScript to add styles.

I think this should be simpler, though, so I'm going to talk to the RadEditor Team and see if we can add a CSS Class to the disabled Editor DIV tag so that the process becomes as easy as defining the styles for a specific CSS class. For now though, use some JavaScript and you should be set to go.

Let me know if that helps.

-Todd
0
Rumen
Telerik team
answered on 31 Jul 2008, 07:05 AM
Hi guys,

You can easily style the editor DIV tag in "Enabled=false" mode by setting the Style property of RadEditor, e.g.

<telerik:RadEditor runat="server" ID="RadEditor1" Enabled="false" Style="overflow: scroll;background-color: Red; color: Black;border: 1px solid red;" Width="75" Height="100">
   <Content>
   <strong>Line 1</strong><br />
   <strong>Line 2</strong><br />
   <strong>Line 3</strong><br />
   <strong>Line 4</strong><br />
   <strong>Line 5</strong><br />
   <strong>Line 6</strong><br />
   <strong>Line 7</strong>
   </Content>
</telerik:RadEditor>  



Sincerely yours,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Randall
Top achievements
Rank 2
Answers by
Todd Anglin
Top achievements
Rank 2
Rumen
Telerik team
Share this question
or