Changes

Jump to: navigation, search

Template:Spoiler

537 bytes added, 13:58, 21 September 2020
m
no edit summary
<div class="spoilers ggmw-spoiler"><span class="spoilerscollapsible mw-buttoncollapsed"><span class="spoilers-show" style="display:inline"><strong>'''{{{1|Spoiler!</strong> Click to reveal.</span>}}}'''<span div class="spoilersmw-collapsible-hidecontent" style="display:none">Hide</span></span><div class="spoilerspadding-body" style="displayleft:none1em;">'''Formatting works''' {{{2| class="wikitable"|-| Dogs || Cats|Spoiler text.}}}</div>
</div>
</div><noinclude>==Description==Use this template to add a spoiler box to a page (Also see [[Template:Hint]]).
<!-- This template replaces the tag provided by the <nowiki><spoiler></nowiki> extension. Originally it was intended to allow using tables (which the extension doesn't) but it turned out the template doesn't allow for it either. Still, it is recommended to use this template as we have more freedom to restyle it or change its behavior down the line if we want to. -->This template allows for formatting of spoiler content.== Description ==Known issues====* <span style="color:red">Tables may or may not be formatted inside the template.</span> Suggest using definition lists as a workaround.==Examples==A basic spoiler like this may be better replaced with [[Template:Hint]]:
<pre>
{{Spoiler|Spoiler|Sarina's clothes are not outside, but inside the [[Boarded up Basement]] dungeon.}}<text/pre>{{Spoiler|Spoiler|Sarina's clothes are not outside, but inside the [[Boarded up Basement]] dungeon.
}}
This is an example of a spoiler used for a quest reward.
<pre>
{{Spoiler|Reward for Contacting Melandria's Brother
|Reward: {{Item|Pumpkin}} x1, 300 Councils, 50 Favor}}
</pre>
 Use this template to add a spoiler '''section''{{Spoiler|Reward for Contacting Melandria' to a page (for inline text use [[Template:Hint]] instead).s Brother| I made this template to replace the tag provided by the <nowiki><spoiler></nowiki> extension, because {{Quote|Thank you so much for some reason it seems to bypass some of the MediaWiki formatting. This version uses the same Javascript codeyour help! Here, but doesn't rely on the backend php code extension for the spoiler tag, so the content of the spoiler is treated as standard MediaWiki formattinghave a pumpkin.}} AlsoReward: {{Item|Pumpkin}} x1, 300 Councils, we can make it look nice later (add a little icon for example).50 Favor}}
[[Category:Formatting templates|Spoiler]]
</noinclude>

Navigation menu