1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-29 00:33:15 +00:00

Added tooltip examples to the link widget

This commit is contained in:
Jermolene 2014-03-09 09:16:31 +00:00
parent 289bec0fd5
commit 53755d87c8

View File

@ -11,12 +11,31 @@ The `link` widget generates links to tiddlers.
The content of the link widget is rendered within the `<a>` tag. The content of the link widget is rendered within the `<a>` tag.
The default tooltip is: The default value of the tooltip attribute is `<<tw-wikilink-tooltip>>`. If that variable is not defined then the following text is used:
``` ```
<$transclude field="tooltip"><$transclude field="title"/></$transclude> <$transclude field="tooltip"><$transclude field="title"/></$transclude>
``` ```
This means that you can control the text of a link tooltip in several ways:
```
<$link to="HelloThere" tooltip="Custom tooltip">Link 1</$link>
<$set name="tw-wikilink-tooltip" value="I'm a link to {{!!title}}">
<$link to="HelloThere">Link 2</$link>
</$set>
```
Renders as:
<$link to="HelloThere" tooltip="Custom tooltip">Link 1</$link>
<$set name="tw-wikilink-tooltip" value="I'm a link to {{!!title}}">
<$link to="HelloThere">Link 2</$link>
</$set>
Note that the tooltip is rendered with the current tiddler set to the target of the link. Note that the tooltip is rendered with the current tiddler set to the target of the link.
! CSS Classes ! CSS Classes