Node Inspector: Add functionality

4 posts, 0 answers
  1. Matthias
    Matthias avatar
    2 posts
    Member since:
    Aug 2019

    Posted 20 Aug 2019 Link to this post

    Hello all,

    I'm trying to add a checkbox with custom functionality to the NodeInspector for 'A'-tags; specifically I want to alter the href of an a-tag by appending a GET-Parameter depending on the checkbox-state.

    So far, I've been able to find a way to select from the available functions of the NodeInspector as shown here, but I couldn't find a way to add a checkbox to the list of available functions.

    Is there any such possibility to add a function to the NodeInspector and what would be the intended way to do so?

     

    Many thanks,
    Matthias

  2. Eric R | Senior Technical Support Engineer
    Admin
    Eric R | Senior Technical Support Engineer avatar
    364 posts

    Posted 22 Aug 2019 Link to this post

    Hi Mathias,

    There isn't specific functionality to alter the Built-In Modules.  As a workaround, to perform a GET request in the HREF property of an Anchor Tag, the common practice is to append the parameters to the URL.

    This is can be seen in the Modules Demo by moving the cursor to each linked text as described in the below screenshot.

    Alternatively, It is possible to create Custom Modules. Although, this might be overkill for this scenario.

    I hope this helps. Please let me know if you need any additional information. Thank you for using the UI for ASP.NET AJAX Forums.

    Regards,

    Eric R | Technical Support Engineer
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Matthias
    Matthias avatar
    2 posts
    Member since:
    Aug 2019

    Posted 23 Aug 2019 in reply to Eric R | Senior Technical Support Engineer Link to this post

    Hi Eric R,

    thanks for your reply.

    Unfortunately the users won't be able to know the value of the paramter to be added to the href. Therefore I was trying to add the parameter programatically "onclick" of the checkbox in question.

    Although this might not be best practice, but is there a way to add a new "nodeAttribute" (or what ever they're called internally) to the editor, which I could include into the module NodeInspector using the hack referenced in the previously mentioned articel, like so:

    Telerik.Web.UI.Editor.Modules.RadEditorNodeInspector.prototype._nodeAttributesArray["A"] = [
        // the default ones for an a-tag/link
        "href", "target", "LinkManager", "id", "title", "className",
        // my custom checkbox
        "myCheckboxElement"
    ];

     

    I could then use javascript to alter the href "onclick" of that checkbox. - Otherwise I might have to go the route of a custom module specifically for the a-tags.

     

    Thanks again for your help.

    Regards,
    Matthias

  4. Eric R | Senior Technical Support Engineer
    Admin
    Eric R | Senior Technical Support Engineer avatar
    364 posts

    Posted 26 Aug 2019 Link to this post

    Hi Matthias,

    At this time, the supported approached is to use Custom Modules. We also provide a Custom Modules demo for reference. 

    Additionally, we encourage any feedback about existing or desired functionality at the UI for ASP.NET AJAX Feedback Portal.

    Please let me know if you need any additional information. Thank you.

    Regards,


    Eric R | Technical Support Engineer
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top