RadEditor for ASP.NET

SetMode Send comments on this topic.
Client-side API Reference > Methods > SetMode

Glossary Item Box

Sets the editor in HTML, Preview or Design mode

function SetMode (value)

value: 1 integer Sets Telerik RadEditor in Design mode
value: 2 integer Sets Telerik RadEditor in HTML mode
value: 3 integer Sets Telerik RadEditor in Preview mode
 
The following example will set the editor in HTML mode on page load
ASPX/ASCX Copy Code
<script type="text/javascript">
function OnClientLoad(editor)
{
var oFun = function ()
{    
 
window.setTimeout(function()
      {
         
//set the editor in HTML mode
         
editor.SetMode(2);
      }, 10);
}
window.onload = oFun;
}
</script>
<
rad:RadEditor id="RadEditor1" OnClientLoad="OnClientLoad" Runat="server"></rad:RadEditor>