A plugin that uses tooltipjs to automatically transform glossary items into tooltips instead of seeing the default browser title attribute on hover.
book.json
{
"plugins": ["glossary-tooltip"]
}
then run
$ gitbook install
book.json
"pluginsConfig": {
"glossary-tooltip":{
"parseGlossaryItems": false,
}
}
Option | Description |
---|---|
parseGlossaryItems {Boolean} default: true |
tells the plugin whether to apply tooltips to glossary items or not |
trigger {string} default: hover |
the event that triggers the tooltip. one of ['hover', 'click', 'focus'] |
placement {string} default: top |
placement of the tooltip relative to the trigger element. one of ['top', 'bottom', 'left', 'right']" |
You can also place your own tooltip in your markdown
tooltip
takes one required named/unnamed argument:
topic
(string
): The text to display in the tooltip trigger element.
example:
{% tooltip "sample tooltip" %} sample tooltip test with **Emphasis** {% endtooltip %}
Pull requests are welcome