New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Setting Content Area Defaults in Html mode

HOW-TO

Set Content Area Defaults in Html mode

SOLUTION

The code below demonstrates how to get a reference to the TextArea element of RadEditor used in Html mode and set its background-color and color properties programmatically:

ASP.NET
<script type="text/javascript">  
function OnClientLoad(editor)  
{          
    var area = editor.get_textArea(); //get reference to the textarea of RadEditor in Html mode  
    area.style.color = "red";  
    area.style.backgroundColor = "yellow";              
}  
</script> 
 
<telerik:RadEditor runat="server" 
    OnClientLoad="OnClientLoad" 
    ID="RadEditor1">  
</telerik:RadEditor> 
In this article
HOW-TOSOLUTION
Not finding the help you need?
Contact Support