Skip to content

DOM Helper

The DOM Helper offers utility functions to simplify Node-RED editor DOM manipulation, reducing development effort. Optimized for tree-shaking, it ensures a lightweight and efficient final bundle. 🚀

Usage

All functions can be imported from the package like this for example:

typescript
import { initSelect, watchInput } from '@keload/node-red-dxp/editor/dom-helper';

And you benefit from tree-shaking in the final bundle 🚀

INFO

This documentation is automatically generated from the source code.

Functions

FunctionDescription
addClassesOnSelectorsAdds the specified CSS classes to multiple DOM elements.
applyTypedInputApplies a typed input widget to a DOM element.
getFormValuesRetrieves values from form inputs within a specific prefix in their id.
handleAddRemoveClassesOnSelectorsHandles adding or removing CSS classes on multiple DOM elements based on the specified action.
initSelectInitializes a <select> element with the given options.
initTabsInitializes a tab system with the provided configuration and handles tab switching behavior. This function creates a set of tabs and associates them with a specified container. It also sets an initial active tab and switches between tabs when a tab is clicked.
isCheckboxCheckedChecks whether a checkbox is checked based on a CSS selector.
isNodeInputChecks if a given selector is a node input selector.
jqSelectorResolves a given selector string into a jQuery object based on predefined rules.
removeClassesOnSelectorsRemoves the specified CSS classes from multiple DOM elements.
resolveInputKeyExtracts the key part from a resolved input selector.
resolveSelectorResolves a selector string into a specific format based on predefined rules.
setFormValuesSets values into form inputs identified by a specific prefix in their id.
setInputValueSets the value of an input element.
setTextSets the text content of a DOM element.
watchInputWatches for changes on input elements and triggers a callback with the updated values.

Version v1.33.1 - Built on 2026-03-28