This is a migrated thread and some comments may be shown as answers.

Enable ToolBar in Html mode

1 Answer 104 Views
Editor
This is a migrated thread and some comments may be shown as answers.
J
Top achievements
Rank 1
J asked on 11 Aug 2008, 11:55 PM
I need to work only in htmlmode by default and I want to be able to insert "html code snippets" into the html mode and actually see the code. 

I would like to know if its possible to enable the toolbar in html mode?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 12 Aug 2008, 11:55 AM
Hi J,

The following example will set the editor in Html mode on page load:

<script type="text/javascript">
function OnClientLoad(editor, args)
{
   editor.set_mode(2);
}
</script>
<telerik:radeditor runat="server" id="RadEditor1" OnClientLoad="OnClientLoad"></telerik:radeditor>

If you want to display only the Html mode and hide the Design and Preview modes set the EditModes property to Html, e.g.

<telerik:RadEditor runat="server" ID="RadEditor1" EditModes="Html"></telerik:RadEditor>

RadEditor does not offer the ability to enable the toolbar in Html mode and you will need to implement your own custom toolbar or button. You can get a reference to the content area on the client with

editor.get_textArea();

Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
J
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or