Feature summary (what you would like to be able to do and where):
I would like the VisualEditor to identify when a template is designed to be used by substitution only (not by transclusion), so that when adding it, it will also add subst: to the template name. This way, when the page is saved, the template code will be substituted into it.
Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
Many templates are designed for use by substitution only (not by transclusion). When using the VisualEditor, the search box finds these templates, but when selected they are added like any other template, by transclusion (no subst: is added to the wikicode).
Today, to substitute such a template using the VisualEditor, one has to use the "subst: hack", i.e. type "subst:" followed by the template name in the search box, DON'T select the template from the suggestion list, and click the "add" button. However, this hack is not user-friendly, and it would be very helpful to have the option to use these templates the way they are designed to be used built into the interface. If the editor could identify such templates in some way (by being in the category I linked to above, or by a template stating this in their documentation page, or some marking in the templatedata json code, or a magic word, or any other way), it would be great.
Benefits (why should this be implemented?):
In the last link above, it is stated that "most users won’t ever need to resort to substitution." I agree that in most template-adding *edits*, there is no need for substitution. But there are some very widely used substitution-only templates, which are relevant to many users; and there are groups of users (aged people, for example) who don't know how to edit wiki source code, and the VisualEditor is their only usable editing tool. Currently, when they need to use these templates they either ask for help, or do it wrongly. It would be great if the editor itself could add the templates correctly with the user performing the usual procedure, with no need for any hack.