Template:Tooltip: Difference between revisions

Template page
mNo edit summary
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<span class="tooltip">{{{text|Regular text}}}<span class="tooltiptext">{{{tooltip|Tooltip text}}}</span></span>
<span class="tooltip">{{{text|Regular text}}}<span class="tooltiptext">{{{tooltip|Tooltip text}}}</span></span><noinclude><templatedata>
<noinclude><templatedata>
{
{
     "description": "Tooltip that shows when hovering over text.",
     "description": "Tooltip that shows when hovering over text. IMPORTANT: If you add a space after the template and use another Tooltip later (in the same paragraph(?)), the parser may treat it as a new line beginning with a space and format the text in between using <pre> tags - to remedy this, remove the space immediately after the closing braces of the template; when viewed, there will still appear to be a space.",
     "params": {
     "params": {
         "text": {
         "text": {

Latest revision as of 04:10, 13 December 2023

Regular textTooltip text

Tooltip that shows when hovering over text. IMPORTANT: If you add a space after the template and use another Tooltip later (in the same paragraph(?)), the parser may treat it as a new line beginning with a space and format the text in between using <pre> tags - to remedy this, remove the space immediately after the closing braces of the template; when viewed, there will still appear to be a space.

[Edit template data]

Template parameters

ParameterDescriptionTypeStatus
Regular Texttext

The text to display normally.

Stringrequired
Tooltip Texttooltip

The text to display in the tooltip

Stringrequired