{hero}

displayNode()

Since: Editor 1.5

Get the host node for the display controller.
Please note - this property requires the Editor extension for DataTables.

The full Editor reference documentation is available to registered users of Editor - the information shown below is a summary only. If you already have an Editor license please , alternatively an Editor license can be purchased on this site, or sign up for the free trial.

Description

Editor's ability to display its editing form using different display controllers (display) can be very useful to have the style of Editor fit seamlessly into your site. However, you may also wish to gather information from the display controller that is being used by Editor - adding styling information or other options for example.

This method provides the ability to access the node that the display controller uses for the form's display. Typically this will be a modal element, but it depends upon the display controller being used.

The node returned by the display controllers included in the Editor package are:

Comments (1)

maxmedia@v2.4.110:51, Mon 24th Feb 2025

For Bootstrap styling if you need to add classes to 'modal-dialog' you can do so with:

1
$(editor.displayNode()).find('.modal-dialog').addClass('modal-xl');

Or set the class directly using:

1
DataTable.Editor.display.bootstrap.classes.modal = '...';

edited By Allan - to add .classes.modal option.

Post new comment

Contributions in the form of tips, code snippets and suggestions for the above material are very welcome. To post a comment, please use the form below. Text is formatted by Markdown.

To post comments, please sign in to your DataTables account, or register:

Any questions posted here will be deleted without being published.
Please post questions in the Forums. Comments are moderated.