node-red-dashboard icon indicating copy to clipboard operation
node-red-dashboard copied to clipboard

Feature Request: Allow ui-template to load content from an external file

Open thalesmaoanz opened this issue 3 months ago • 0 comments

The ui-template node's built-in editor is sufficient for small templates. However, for larger and more complex UIs, it becomes difficult to manage, debug, and organize the code. This workflow prevents the use of powerful features from external editors like VS Code, such as linting, autocompletion, and better syntax highlighting.

Proposed Solution

Add a configuration field to the ui-template node to specify a path to an external file (e.g., my-template.html). If a file path is provided, the node will load its content from that file, overriding the content of the built-in editor.

Benefits

This change would significantly improve the development experience by enabling:

Use of Modern Editors: Allows developers to use VS Code, Sublime Text, or other IDEs.

Improved Tooling: Enables the use of linters, formatters, and advanced debugging tools.

Better Organization: Separates UI code (HTML/CSS/JS) from the Node-RED flow logic.

Version Control: Template files can be properly tracked with Git, independent of the flows.json file.

Possible Workaround: Can the ui-template content be set dynamically using msg.ui_update.format?

thalesmaoanz avatar Sep 15 '25 22:09 thalesmaoanz