Last modified: 2014-06-27 16:17:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56186, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54186 - VisualEditor: If some content is selected when inserting a template, replace it with the template with the selection magically inserted as the first(?!) parameter
VisualEditor: If some content is selected when inserting a template, replace ...
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: Low enhancement
: ---
Assigned To: Editing team bugs – take if you're interested!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-16 21:33 UTC by Elitre
Modified: 2014-06-27 16:17 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Elitre 2013-09-16 21:33:14 UTC
(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 https://fr.wikipedia.org/wiki/Mod%C3%A8le:Refnec#Exemples ).
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.
Thanks.
Comment 1 Ltrlg 2013-09-16 21:39:27 UTC
And I think that such a functionality would need to be able to remove the template by replacing it with its first parameter.
Comment 2 NicoV 2013-09-16 21:44:09 UTC
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
Comment 3 NicoV 2013-09-18 16:45:40 UTC
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.

https://en.wikipedia.org/wiki/Template:Columns-list
Comment 4 Bartosz Dziewoński 2014-06-27 16:17:00 UTC
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).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links