Template:Spoiler: Difference between revisions
Jump to navigation
Jump to search
(Imported template from my private wiki) |
mNo edit summary |
||
| Line 1: | Line 1: | ||
<noinclude>{{doc}}</noinclude><{{{element|div}}} class="mw-collapsible mw-collapsed spoiler" id="mw-customcollapsible-ShowSpoiler">{{{1}}}</{{{element|div}}}>{{#ifeq:{{{2|}}}|button|{{SpoilerButton}}}} | <noinclude>{{doc}}[[Category:Spoiler Templates]]</noinclude><{{{element|div}}} class="mw-collapsible mw-collapsed spoiler" id="mw-customcollapsible-ShowSpoiler">{{{1}}}</{{{element|div}}}>{{#ifeq:{{{2|}}}|button|{{SpoilerButton}}}} | ||
Revision as of 14:41, 28 October 2026
{{spoiler|SpoilerHere}}
Description
This template hides spoiler text on a page.
By default, it can be controlled using SpoilerButton. Placing SpoilerButton at a specific location in an article will automatically control the visibility of the spoiler template, regardless of where the spoiler template is positioned.
Alternatively, setting the second parameter to yes ({{spoiler|SpoilerText|yes}}) will automatically render the spoiler button directly alongside the template, making SpoilerButton optional.
Example
Input:
{{SpoilerButton}}
This text does not contain spoilers. {{spoiler|This text is a spoiler.}}
Output:
This text does not contain spoilers.This text is a spoiler.
{{{1}}}