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

Unable to change RadEditor Toolbar in client Javascript code after Page_Load()

2 Answers 61 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Chuck
Top achievements
Rank 1
Chuck asked on 10 Sep 2014, 06:41 PM
Hello,

I'm having problem to change the Radeditor toolbar dynamically in the Client script after aspx page load. I would like to load the different toolbar for the Radeditor on the fly depending on different user context selection so that the toolbar would have different function buttons available. I execute the following JavaScript code but the toolbar buttons do not reflect what I defined in the toolsfile xml file.  Do I need to call other client api to force reload the toolbar file?

launchEditor: function (editor, title) {

  if (title = 'Dsplay Name') {
     editor.ToosFile = "~/Toolbar/DisplayNameToobar.xml";
  } else if (title = 'FootNote') {
     editor.ToosFile = "~/Toolbar/FootNoteToobar.xml";
  } else {
     editor.ToosFile = "~/Toolbar/MiscToobar.xml";
  } 

},

Thanks,
Chuck


 

2 Answers, 1 is accepted

Sort by
0
Chuck
Top achievements
Rank 1
answered on 10 Sep 2014, 07:33 PM
Also, as an alternative, is there a way (sample code)  to add/remove/hide Radeditor toolbar buttons dynamically in the Client JavaScript code?

Thanks,
Chuck
0
Danail Vasilev
Telerik team
answered on 15 Sep 2014, 10:22 AM
Hello Chuck,

I am sorry to say that it is not possible to change/customize RadEditor's toolbar on the client. You can, however, do that on the server with an AJAX request. More information on customizing editor's toolbar is available in this online demo.

Regards,
Danail Vasilev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Editor
Asked by
Chuck
Top achievements
Rank 1
Answers by
Chuck
Top achievements
Rank 1
Danail Vasilev
Telerik team
Share this question
or