make HTML source text bigger?

2 posts, 0 answers
  1. tim
    tim avatar
    3 posts
    Member since:
    May 2011

    Posted 11 May 2011 Link to this post

    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.
  2. Rumen
    Admin
    Rumen avatar
    13804 posts

    Posted 16 May 2011 Link to this post

    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.

Back to Top