Jump to content

Template:Spoiler: Difference between revisions

From LithoGraphica
Reversedragon (talk | contribs)
m manual markup
Reversedragon (talk | contribs)
m typo
 
Line 1: Line 1:
<includeonly><onlyinclude><del title="{{#if:{{{title|}}}|{{{title}}}|spoilers}}" class="spoiler"><ruby><rt class="aural">{{#if:{{{tts|}}}|{{{tts}}}|spoiler}}</rt><rp>: </rp><span class="visual" aria-hidden="true">{{{1}}}</span></ruby></del></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:


<del title="{{#if:{{{title|}}}|{{{title}}}|spoilers}}" class="spoiler">
<del title="{{#if:{{{title|}}}|{{{title}}}|spoilers}}" class="spoiler tts">
   <ruby>
   <ruby>
     <rt class="aural">{{#if:{{{tts|}}}|{{{tts}}}|spoiler}}</rt>
     <rt class="aural">{{#if:{{{tts|}}}|{{{tts}}}|spoiler}}</rt>

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