Jump to content

Template:Spoiler: Difference between revisions

From LithoGraphica
Reversedragon (talk | contribs)
copy markup from Template:censor
 
Reversedragon (talk | contribs)
m typo
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly><onlyinclude>{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}} | {{{2|}}}{{{3|}}} = {{TTS|html=del|class={{{class|censor}}}|{{{1}}}|{{{tts|spoilers}}}|title={{{title|}}}}} | #default = {{TTS|html=del|class={{{class|censor}}}|t1={{{1}}}|{{{2}}}|t3={{{3|}}}|{{{tts|spoilers}}}|title={{{title|}}}}} }}</onlyinclude></includeonly><!--
<includeonly><onlyinclude><del title="{{#if:{{{title|}}}|{{{title}}}|spoilers}}" class="spoiler tts"><ruby><rt class="aural">{{#if:{{{tts|}}}|{{{tts}}}|spoiler}}</rt><rp>: </rp><span class="visual" aria-hidden="true">{{{1}}}</span></ruby></del></onlyinclude></includeonly><!--
 
more readable version:
more readable version:


{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}}
<del title="{{#if:{{{title|}}}|{{{title}}}|spoilers}}" class="spoiler tts">
| {{{2|}}}{{{3|}}} = {{TTS|html=del|class={{{class|censor}}}|{{{1}}}|{{{tts|redacted}}}|title={{{title|}}}}}
  <ruby>
| #default = {{TTS|html=del|class={{{class|censor}}}|t1={{{1}}}|{{{2}}}|t3={{{3|}}}|{{{tts|redacted}}}|title={{{title|}}}}}
    <rt class="aural">{{#if:{{{tts|}}}|{{{tts}}}|spoiler}}</rt>
}}
    <rp>: </rp><span class="visual" aria-hidden="true">{{{1}}}</span>
  </ruby>
</del>
 
-->
-->
== Demo ==
== Demo ==

Latest revision as of 05:46, 2 October 2026

Demo

Then, when all hope is lost for the tale / The final tragedy will unveil. / To save the worlds, there is only one way. / spoiler:

Description

This is a template for superficially hiding words. It is a variant of Template:censor specifically for use in contexts like spoilers for specific plot points in a piece of media.

In visual browsers, the word will be visible when highlighted. In text-to-speech, it will be pronounced "spoilers". Whatever string was originally entered can still always be viewed in the page's "edit" tab, so think carefully about which pages you want to edit.

Parameters

  • tts - Pronunciation for redacted text. Specify this first so that if screen readers are attempting to edit a page as plain text the TTS-friendly text is said before the "irrelevant" visual text which will be not be read as deleted.
  • 1 / 2 - Text to be redacted, which will be visible on highlight but not pronounced.
  • tts2 - Not displayed. When words are chopped in two with t1 or t3, or you wish to make a word both invisible on page and searchable in editing, use this to include an un-chopped censored word for search purposes.
  • title - Text to be shown on tooltip. (optional)

Only for use in other Templates

  • class - CSS classname.

Internal templates