Page MenuHomePhabricator

Allow removal of <ref> tags on the VisualEditor Cite tool
Closed, DuplicatePublicFeature

Description

Feature summary (what you would like to be able to do and where):
Add a parameter in MediaWiki:Cite-tool-definition.json to disable automatically adding <ref> and </ref> around the citation.

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):
This would be an opt-in toggle used for templates that implement the <ref> tag in their own source code. As it stands, such templates do not work with the Cite tool, as it wraps them in <ref> tags resulting in two levels of tags, breaking citations.

Benefits (why should this be implemented?):
This would allow ref tags to be placed within a citation template. For the use case of the wiki I am coming from, we use quite a lot of ref tags in most paragraphs, resulting in the source code being very hard to read. Since a large amount of our editors use the Visual Editor, though, we can't make changes to improve the source experience if it would detriment the visual editing experience. There are also other potential reasons to do this, such as if a wiki wants to automatically fill any of the ref fields based on a template's parameters or if they want to wrap the ref tag with other HTML tags.

Additionally, as this would be an opt-in feature, it would be fully backwards compatible.