VisualEditor: If some content is selected when inserting a template, replace it with the template with the selection magically inserted as the first(?!) parameter
Open, LowPublic


(Hopefully other reporters will improve the title and description if necessary!)
The French Wikipedia has a number of templates which usually ask for some kind of clarification about a whole passage of text (see ).
So users are asking that, when they select that text and launch the template inspector, the text is already recognized as a "parameter" for that template.

Version: unspecified
Severity: enhancement


bzimport raised the priority of this task from to Low.
bzimport set Reference to bz54186.
Elitre created this task.Sep 16 2013, 9:33 PM
Ltrlg added a comment.Sep 16 2013, 9:39 PM

And I think that such a functionality would need to be able to remove the template by replacing it with its first parameter.

NicoV added a comment.Sep 16 2013, 9:44 PM

I think it's not only the French wiki that may use this... On English wiki, the equivalent of {{Refnec}} and its "1" parameter is {{Citation needed span}} and its "text" parameter.

Maybe a way of implementing this would be the following :

  • Add an information in TemplateData to be able to tell which parameter should be initialized with the selected text
  • When you insert a template with VE, if the TemplateData as such configuration, use the selected text to initialize the parameter
NicoV added a comment.Sep 18 2013, 4:45 PM

This feature would be very helpful for other common templates in articles. For example, the {{Colonnes}} template on French wiki, or its equivalent {{columns-list}} template on English wiki to put text/lists on several columns.

I think a better way to solve this would be to somehow allow templates to be treated as 'annotations' in VE (like bold style or links).