Fandom Developers Wiki

This page is a documentation on troubleshooting of issues often encountered when setting up WdsTooltips.

Toggle Creating Line Breaks

By default, MediaWiki wraps plain text blocks inside paragraphs (<p>). Since <p> is a block-level element which only allows phrasing elements inside, it gets cut off/closed as soon as meeting a <div> element, preventing the tooltip toggle from being used in-line with other text. This behaviour can be worked around by manually wrapping the containing text block with <span> or <div> (or any of the relevant HTML tags) that can avoid the auto-generation of <p> elements.

To best comply with accessibility and semantics, the format specified below is recommended.

<div role="paragraph">This is an {{WdsTooltips|inline-level|content}} tooltip.</div>
This is an

Using Line-break Wikitext

As whitespaces are stripped from the beginning and end of the content, starting the content with line-break wikitext markups (*, #, ;, :, {| |}) might not be straightforward. This can be worked around by inserting a whitespace character <nowiki/> at the beginning.
|A list
# ListItem1
# ListItem2
# ListItem3
|class2 = wds-is-left-aligned
A list
  1. ListItem1
  2. ListItem2
  3. ListItem3

Passing Named Parameters

Depending on the complexity of markup, passing parameters as named (|2 = or |content =) might also be necessary for the parser to properly understand the template call.

|toggle = A table
|content = <nowiki/>
{{{!}} class="wikitable"
! Header1 !! Header2
{{!}} Content1 {{!!}} Content2
|class2 = wds-is-left-aligned
A table
Header1 Header2
Content1 Content2
Text above can be found here (edit)