This template can be used to mark text as a spoiler.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Text | 1 text | The text to be shown.
| Content | required |
| Show on Hover? | hover | Show spoiler text on mouse hover.
| Boolean | optional |
The hoverShowSpoilers gadget
Users can enable Gadget - hoverShowSpoilers to make spoilers show on hover, not just on click. The code for this gadget can be found at Gadget - hoverShowSpoilers.css.
Examples
| Code | Result |
|---|---|
{{spoiler|spoiler text}} (Click to toggle) |
spoiler text |
{{spoiler|spoiler text with a [[Template:Navbox|link]]}} (Click to toggle) |
spoiler text with a link |
Dependencies
For this template to work properly, you need the following:
- The small JavaScript code for toggling the
.spoilerclass on/off on click, found in MediaWiki:Common.js. - The
.spoiler-contentand any related classes, found in MediaWiki:Common.css.
Source
Base code adapted from Template:Spoiler on Terraria Wiki.