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

[Solved] Setting CSS class for textarea in RadEditor

2 Answers 222 Views
Editor
This is a migrated thread and some comments may be shown as answers.
GrZeCh
Top achievements
Rank 2
GrZeCh asked on 15 Jun 2009, 06:16 PM
Hello,

i'm using jqTransform:

http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/

on my page but during form transformation it tries to transform RadEditor textarea too. My plan is to modify jqTransform javascript file to skip textarea which has set some certain CSS class (for example .nojqTransform). Is there any way to set css class for RadEditor text area?

Thanks

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 16 Jun 2009, 12:02 PM
Hello GrZeCh,

Using the code below you will can set a css class to the editor's IFRAME, its BODY element and to the TextArea of RadEditor in HTML mode.

    <script type="text/javascript"
        function OnClientLoad(editor) 
        { 
             editor.get_contentAreaElement().className = "MyContentAreaIFRAMECssClass"
            editor.get_contentArea().className = "MyContentAreaCssClass"
            editor.get_textArea().className = "MyTextBoxAreaInHtmlModeClass"
        } 
    </script> 
    <telerik:RadEditor ID="RadEditor1" OnClientLoad="OnClientLoad" runat="server"></telerik:RadEditor>  


Best regards,
Rumen
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
GrZeCh
Top achievements
Rank 2
answered on 17 Jun 2009, 07:34 AM
is there any chance to set this programmatically?

EDIT:

or maybe someone is good at jQuery selectors (http://docs.jquery.com/Selectors/). This is how transformation of textarea looks like in JavaScript:
$('textarea'this).jqTransTextarea(); 

and maybe wrapping RadEditor with div which has set some css class and changing this selector could solve my problem.

EDIT2: I've managed to find selector on my own:

$('textarea:not(div.nojqTransform textarea)'this).jqTransTextarea(); 
Tags
Editor
Asked by
GrZeCh
Top achievements
Rank 2
Answers by
Rumen
Telerik team
GrZeCh
Top achievements
Rank 2
Share this question
or