New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Change RadEditor ContentAreaCssFile on client side


Product RadEditor for ASP.NET AJAX


See how to change the RadEditor ContentAreaCssFile on the client by updating the href attribute of the iframe content area CSS file


Here is the implementation:

   <script type="text/javascript">
        function OnClientLoad(editor) {
            setTimeout(function () {
                var head = editor.get_document().getElementsByTagName("HEAD")[0];
                $telerik.$(head).find("#RADEDITORSTYLESHEET0").attr("href", "EditorContentAreaNew.css");
            }, 200);
    <telerik:RadEditor runat="server" ID="RadEditor1" OnClientLoad="OnClientLoad" ContentAreaCssFile="EditorContentArea.css">
            <div class="myClass">sample content</div>
In this article