I cant seem to find a way to get the editor to start in HTML mode. It always starts in design mode when you enable all 3 modes. Is there a way to do this?
3 Answers, 1 is accepted
0
Rumen
Telerik team
answered on 14 Aug 2008, 03:15 PM
Hi jason777,
The following code example will set the editor in Html mode on page load
<scripttype="text/javascript"> function OnClientLoad(editor,
args)
{
editor.set_mode(2);
} </script>
<telerik:radeditorrunat="server"id="RadEditor1"OnClientLoad="OnClientLoad"></telerik:radeditor>
Best regards,
Rumen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Hmmm, so I assume there is no server side method to allow this. I guess I could write out that javascript from the server side but that not optimal. Thats odd a feature that easy to implement isnt in the api.
0
Rumen
Telerik team
answered on 15 Aug 2008, 11:08 AM
Hello jason777,
Basically, if you set the following code in the PageLoad event
RadEditor1.EditModes = EditModes.Html;
The editor will be rendered in Html mode, but will not display its Design and Preview modes.
Another way is to output the provided javascript in my earlier reply from the codebehind using RegisterClientScriptBlock or RegisterStartupScript server methods.
Best regards,
Rumen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.