Template:Tooltip: Difference between revisions

Template page
(Created page with "<div class="tooltip">{{{text|Regular text}}} <span class="tooltiptext">{{{tooltip|Tooltip text}}}</span> </div> <noinclude><templatedata> { "description": "Parameters for background colors and text messages.", "params": { "text": { "label": "Regular Text", "description": "The text to display normally.", "type": "string", "required": true }, "tooltip": { "label": "Tooltip Text",...")
 
mNo edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="tooltip">{{{text|Regular text}}}
<span class="tooltip">{{{text|Regular text}}}<span class="tooltiptext">{{{tooltip|Tooltip text}}}</span></span><noinclude><templatedata>
  <span class="tooltiptext">{{{tooltip|Tooltip text}}}</span>
</div>
<noinclude><templatedata>
{
{
     "description": "Parameters for background colors and text messages.",
     "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