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

3 posts, 0 answers
  1. Chuck
    Chuck avatar
    18 posts
    Member since:
    Apr 2014

    Posted 10 Sep 2014 Link to this post

    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. Chuck
    Chuck avatar
    18 posts
    Member since:
    Apr 2014

    Posted 10 Sep 2014 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1494 posts

    Posted 15 Sep 2014 Link to this post

    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.

     
Back to Top