Should tags that are not present in tag configuration be considered groupable? This includes custom tags set in user-level preferences, and tags found existing on the page which are absent in the config.
Minimum number of tags that a group should contain
Name of grouping template.
A group template is a template container that takes the form
{{group template name| {{tag template 1}} {{tag template 2}} }}
Any other kind of "grouping" is not supported.
If groupTemplateName is null, grouping is always disabled for the mode.
Individual tags can be excluded from grouping by setting excludeInGroup=true for that template in tag data configuration.
Grouping can also be disabled depending on user input or other factors by setting this.params.disableGrouping = true in the preprocessParams() hook.
Default: null, which indicates no grouping template for the mode.
Regex that matches the name of the group template name and its popular redirects
Regex flags to apply to go along with groupTemplateNameRegex
Name of the tag mode
List of tags available for use, grouped by sections.
Unused. XXX
Given that the group exists on pageText
(either added by us now or existed before),
move given tagText
into the group
Removal of tags is possible only if this returns true: when the user is viewing the article in read mode or a permalink of the latest version.
Gather the data the user filled into the form.
Validate input. Return a string in case of issues; this string is used as the message for a browser prompt(). Return nothing if all inputs are valid. Use validateInput for customisation.
Create a flat object for speeding up lookup for the tag properties
Invoked when the form is submitted.
Any final cleanup of the page.
Returns the text used as the tooltip for the portlet
Generate the parameter text from the data stored in this.templateParams. this.templateParams is populated automatically based on param names from the configs and values from user input. If any additional changes to templateParams are required, you can do that in preprocessParams().
Get the API query used for querying redirects to the template
Get the regex to be used to search for or remove a tag.
Returns the string used as the Twinkle dialog's title
Get regex that matches the start of the grouping template (the opening braces plus the template name. The template name is captured as a regex group (pun unintended).
Any initial cleanup of the page.
Controls how the final text of new tags is inserted into the page. Defaults to just putting them at the very top of the page, along with two newlines. You may want to override this if you want them to go below any hatnotes or deletion notices (use Morebits.wikitext.page#insertAfterTemplates, see enwiki ArticleMode).
This function assumes that grouping is enabled in the first place.
Make the HTML for the existing tags.
Generates the tag list in the GUI.
Helper function for makeTagList
Parse existing tags. This is NOT asynchronous. Should be overridden for tag modes where removalSupported is true. Populate this.existingTags with the names of tags present on the page.
Actions carried out after the form has been rendered and the Dialog has become visible.
Remove tags from pageText
Remove tag from pageText, if it exists.
true if tag was removed, false otherwise
If the tag is present in pageText, removes it from pageText and adds it to params.groupableExistingTagsText.
Returns true if a group template is to be added to the page, otherwise false.
Get the wikitext of the groupable existing tags, removes it from the page text and adds them to params.groupableExistingTagsText, which the returned promise resolves to.
If inputs are invalid, return a string that is shown to the user via alert(). If inputs are valid, don't return anything.
Generated using TypeDoc
Abstract class for representing a type of page for the tag module.