@@ -19,15 +19,18 @@ following lines to `mkdocs.yml`:
19
19
``` yaml
20
20
markdown_extensions :
21
21
- abbr
22
+ - attr_list
22
23
- pymdownx.snippets
23
24
` ` `
24
25
25
26
See additional configuration options:
26
27
27
28
- [Abbreviations]
29
+ - [Attribute Lists]
28
30
- [Snippets]
29
31
30
32
[Abbreviations]: ../setup/extensions/python-markdown.md#abbreviations
33
+ [Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists
31
34
[Snippets]: ../setup/extensions/python-markdown-extensions.md#snippets
32
35
33
36
### Improved tooltips
@@ -60,9 +63,9 @@ Now, tooltips will be rendered for the following elements:
60
63
61
64
The [Markdown syntax] allows to specify a `title` for each link, which will
62
65
render as a beautiful tooltip when [improved tooltips] are enabled. Add a
63
- tooltip to an link with the following lines :
66
+ tooltip to a link with the following lines :
64
67
65
- ` ` ` markdown title="Link with title , inline syntax"
68
+ ` ` ` markdown title="Link with tooltip , inline syntax"
66
69
[Hover me](https://example.com "I'm a tooltip!")
67
70
` ` `
68
71
@@ -74,7 +77,7 @@ tooltip to an link with the following lines:
74
77
75
78
Tooltips can also be added to link references :
76
79
77
- ` ` ` markdown title="Link with title , reference syntax"
80
+ ` ` ` markdown title="Link with tooltip , reference syntax"
78
81
[Hover me][example]
79
82
80
83
[example]: https://example.com "I'm a tooltip!"
@@ -84,6 +87,19 @@ Tooltips can also be added to link references:
84
87
85
88
[Hover me](https://example.com "I'm a tooltip!")
86
89
90
+ </div>
91
+
92
+ For all other elements, a `title` can be added by using the [Attribute Lists]
93
+ extension :
94
+
95
+ ` ` ` markdown title="Icon with tooltip"
96
+ :material-information-outline:{ title="Important information" }
97
+ ` ` `
98
+
99
+ <div class="result" markdown>
100
+
101
+ :material-information-outline:{ title="Important information" }
102
+
87
103
</div>
88
104
89
105
[Markdown syntax] : https://daringfireball.net/projects/markdown/syntax#link
0 commit comments