Home / Community & Support / Knowledge Base / RadControls for ASP.NET AJAX / Editor / Setting Content Area Defaults in Html mode

Setting Content Area Defaults in Html mode

Article Info

Rating: Not rated

Article information

Article relates to

 RadEditor for ASP.NET AJAX
 Telerik.Web.UI (v.2008.2.826+)

Created by

 Rumen Zhekov


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:

<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> 

Comments

There are no comments yet.
If you'd like to comment on this KB article, please, send us a Support Ticket.
Thank you!

Please Sign In to rate this article.