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

EditModes on focus or toolbar

7 Answers 37 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 04 Feb 2013, 05:54 PM
  Is there anyone to either show the EditModes (Html and Design) on focus (like I have the toolbar currently set) or is there an option to include a control/button in the toolbar for switching modes?

7 Answers, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 06 Feb 2013, 03:50 PM
Hello,

You can add custom toolbar buttons to the toolbar which will call the editor.set_mode() method to change the mode. You can use the OnClientModeChange event and the setState method to enable these buttons in HTML and Preview modes.

Kind regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Alex
Top achievements
Rank 1
answered on 06 Feb 2013, 07:19 PM
  Just what I needed!  Well almost.  :)  The button to take me to HTML mode form design worked great, very simple!  However, I'm not sure how to get back to Design mode now since the toolbar, naturally, disappears when the ToolbarMode is set to ShowOnFocus.  I was hoping that when I used set_mode() that it would show the tabs at the bottom for Design and HTML.  So, for now, if I use the HTML, I'm stuck in HTML mode.  Are you aware of any good workarounds?
0
Rumen
Telerik team
answered on 08 Feb 2013, 02:12 PM
Hello,

You should implement it with the Default toolbar, because indeed the built-in behavior of the ShowOnFocus toolbar is to become hidden in HTML mode. Another approach is to place these buttons outside of the editor.


Kind regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Alex
Top achievements
Rank 1
answered on 08 Feb 2013, 02:19 PM
Ahh, interesting idea putting the button outside.  I'll have to check into that.

By "implemen[ting] it with the Default toolbar" do you simply mean not using ShowOnFocus?
0
Accepted
Rumen
Telerik team
answered on 08 Feb 2013, 04:03 PM
Hello,

You have two options:
- Use the ShowOnFocus toolbar and put the Design, Html and Preview buttons outside.
- OR set the ToolBarMode property to Default and add custom buttons in it for this buttons

All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Alex
Top achievements
Rank 1
answered on 08 Feb 2013, 04:12 PM
  Great, thanks for the help!

  I'm trying to conserve space on a page with multiple RadEditors so ShowOnFocus is idea for this situation.  I'll see if my design can support creating external controls for changing modes.  Perhaps in a future release it would be nice to all a second ShowOnFocus bar just for the purpose of switching modes that would be available in HTML or preview mode.  Thanks!

0
Rumen
Telerik team
answered on 08 Feb 2013, 04:20 PM
Hello,

Thank you for your feature request. If we enable more buttons in HTML mode in the future, we will definitely enable the ShowOnFocus toolbar in HTML mode to show them.

Greetings,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Alex
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Alex
Top achievements
Rank 1
Share this question
or