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

make HTML source text bigger?

1 Answer 57 Views
Editor
This is a migrated thread and some comments may be shown as answers.
tim
Top achievements
Rank 1
tim asked on 12 May 2011, 12:08 AM
Switching to HTML source mode shows the text formatted in blue at a particular point size.

This is a hard set property on the <textarea> that is used to display and edit the text.

There is no built-in classname on this object. All my efforts to override the font size (inclduing specifying the entire dom path to the object using font-size: 1.5em !important; rules doesn't work since the style property ON the runtime-generated textarea overrides the styles in my page sheet.

Out client has stressed how unreadable (and therefore unusable) this makes the html source mode, which is of particular importance to them.

What is the correct method for changing the size of this area? We are using the default skin only.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 16 May 2011, 04:45 PM
Hello Tim,

To customize the appearance of the HTML mode of RadEditor for ASP.NET AJAX you can use the following code:

<script type="text/javascript">
    function OnClientLoad(editor, args) {
        editor.add_modeChange(function (sender, args) {
            var mode = editor.get_mode();
            if (mode == "2") {
 
                editor.get_textArea().style.color = "red";
                editor.get_textArea().style.backgroundColor = "black";
                editor.get_textArea().style.fontName = "Times New Roman";
                editor.get_textArea().style.fontSize = "20px";
            }
        });
    }
</script>
<telerik:RadEditor ID="RadEditor1" OnClientLoad="OnClientLoad" runat="server" >
</telerik:RadEditor>


Greetings,
Rumen
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Editor
Asked by
tim
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or