Comments at start of Dashboard 2.0 ui-template

I want to add a comments header section at the start of a D2 ui-template (not inside <template> or <script>. This seems to work
<!-- this is a comment -->
Is that the recommended way?

This is valid. You of course can't see this on the page source cos vue cleans those out.

Great, thanks.

and if you DO want to see your comments (as regular text not inside <!-- xxx -->) in the rendered vue source, you can put your comments in a span or div or similar and set v-show="false" (v-if wont add it to the DOM, v-show will but instead, set the display style to none)

... think twice and then think twice.

No, I don't want it in the rendered source, it is just to document what the template does, so only needed in the editor.

Just offering it up for anyone passing by. I find it useful when digging into the weeds and need something to find in the source

And in the same vein, every node has a description editor that gets rendered in the info tab and can support markdown formatting including the extended node doc styles listed in Node help style guide : Node-RED

Yes, but for code and similar stuff I much prefer embedded comments.

True dat.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.