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

Node Inspector: Add functionality

3 Answers 67 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Matthias
Top achievements
Rank 2
Iron
Matthias asked on 20 Aug 2019, 08:02 AM

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

3 Answers, 1 is accepted

Sort by
0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 22 Aug 2019, 02:14 PM

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.
0
Matthias
Top achievements
Rank 2
Iron
answered on 23 Aug 2019, 05:43 AM

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

0
Accepted
Eric R | Senior Technical Support Engineer
Telerik team
answered on 26 Aug 2019, 09:31 PM

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.
Matthias
Top achievements
Rank 2
Iron
commented on 28 Jul 2021, 09:56 AM

As I wasn't looking to reinvent the wheel, custom modules seem to be way too heavy for our simple use-case.

Fortunately we've managed to work around the requirement entirely, so although there's no way to modify an existing NodeInspector, I'll accept your response, since we no longer need the light-weight approach and someone else might find the custom modules useful.
Tags
Editor
Asked by
Matthias
Top achievements
Rank 2
Iron
Answers by
Eric R | Senior Technical Support Engineer
Telerik team
Matthias
Top achievements
Rank 2
Iron
Share this question
or