So far so good. This is working fine and the subflow is displayed as node and can be used.
But now I want to add some more functionality like autocompletion on a property input field of the subflow.
Is there any possibility?
In case of custom nodes you have the html part where you can add autocompletion in the oneditprepare part.
But in case of this subflow module the html part is fully auto generated as far as I see.
Anyway is there a possibility to add functionality to the oneditprepare function ?
No, that type of customisation isn't possible with subflow modules.
To add something like autocomplete on an input, the starting point would be look at how it could be added to the regular subflow properties - so it can be included when packaged as a module.
You don't need inheritance here, you need a message. That is the bread and butter of node-red.
The mqtt-in node subscribes to one or more mqtt topics and receives all updates on those topics which it sends as messages to its output port. Your packaged up sub-flow receives those messages, processes them and outputs its own msgs (if you want it to) which go to the next node.
Yeah it is clear that the messages are the bread and butter.
My intension is to reduce duplicated parts in my flows.
I have different flows which uses multi mqtt inputs and i want to avoid that i have always this mqtt in -> custom node combination which is then connected to the central logic of the flow.
This was the reason why i created the subflow with the first 2 nodes.
I am fine with that and can accept it that then no auto completion is possible
Thanks for responses
yes exactly this is what i do currently with setting the property as environment property.
But with this solution i can not add autocompletion on the environment property for the mqtt topic.