https://github.com/lwhiteley/gitbook-plugin-glossary-tooltip
https://github.com/lwhiteley/gitbook-plugin-glossary-tooltip
gitbook gitbook-glossary gitbook-plugin glossary tooltip
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lwhiteley/gitbook-plugin-glossary-tooltip
- Owner: lwhiteley
- Created: 2018-04-12T12:17:37.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-16T17:46:43.000Z (almost 8 years ago)
- Last Synced: 2025-10-11T03:36:45.786Z (4 months ago)
- Topics: gitbook, gitbook-glossary, gitbook-plugin, glossary, tooltip
- Language: JavaScript
- Size: 157 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
GitBook Glossary Tooltip Plugin
==============
A plugin that uses [tooltipjs](https://popper.js.org/tooltip-examples.html) to automatically transform glossary items into tooltips instead of seeing the default browser title attribute on hover.
[](https://badge.fury.io/js/gitbook-plugin-glossary-tooltip)
[](https://travis-ci.org/lwhiteley/gitbook-plugin-glossary-tooltip)
## Add Plugin
book.json
```js
{
"plugins": ["glossary-tooltip"]
}
```
then run
```bash
$ gitbook install
```
### Configure (Optional Step)
book.json
```js
"pluginsConfig": {
"glossary-tooltip":{
"parseGlossaryItems": false,
}
}
```
### Config Options:
| 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']" |
## Template
You can also place your own tooltip in your markdown
##### Args
`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 %}
### Sample output

Pull requests are welcome