Template:Dndbeyond tooltip/doc
This is a documentation subpage for Template:Dndbeyond tooltip. It contains usage information, categories and other content that is not part of the original Template page. |
Creates the content for a tooltip popup similar to the one used by D&D Beyond. This template should not generally be used directly from an article, instead a template for a specific tooltip should be created, and that should be used from an article.
The content of the tooltip can be very finicky, and breaks out of its layout easily, ruining the tooltip effect. Make sure you test any new tooltip before calling it complete! If paragraphs are breaking out of the tooltip, you can use <span class="fake-p">...</span>
to try and fix it. If lists are breaking out of the tooltip, you can use <span class="fake-ul"><span class="fake-li">...</span></span>
to try and fix it.
Parameter | Description | Type | Status | |
---|---|---|---|---|
link text | linktext | Text the user must hover over to view the tooltip. This can be wiki markup, but should be kept to inline output for best user experience. | String | required |
tooltip title | title | Text displayed at the top of the tooltip window. | String | required |
tooltip type | type | Tag on the right side of the tooltip header.
| String | required |
tooltip body | text | Rich text body of the tooltip. Formatting likes to break, so test to make sure it works. | String | required |
icon representing the tooltip | icon | A wiki markup image to be displayed on the left side of the title. Image will be scaled to 45x45.
| String | optional |
horizontal offset | offsetx | Offset the tooltip from its default position by the given number of pixels.
| Number | optional |
vertical offset | offsety | Offset the tooltip from its default position by the given number of pixels.
| Number | optional |