mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 09:50:27 +00:00
Update link widget docs
This commit is contained in:
parent
3282bd948f
commit
6d43b4e8dc
@ -11,11 +11,7 @@ The `link` widget generates links to tiddlers.
|
||||
|
||||
The content of the link widget is rendered within the `<a>` tag.
|
||||
|
||||
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>
|
||||
```
|
||||
The default value of the tooltip attribute is `<<tw-wikilink-tooltip>>`.
|
||||
|
||||
This means that you can control the text of a link tooltip in several ways:
|
||||
|
||||
@ -38,6 +34,17 @@ Renders as:
|
||||
|
||||
Note that the tooltip is rendered with the current tiddler set to the target of the link.
|
||||
|
||||
A useful convention is to set the tooltip like this:
|
||||
|
||||
```
|
||||
\define tw-wikilink-tooltip()
|
||||
<$transclude field="tooltip"><$transclude field="title"/></$transclude>
|
||||
\end
|
||||
```
|
||||
|
||||
This causes the tooltip to be the ''tooltip'' field of the target tiddler. If the field isn't present, then the title is used instead.
|
||||
|
||||
|
||||
! CSS Classes
|
||||
|
||||
* `tw-tiddlylink` - applied to all links
|
||||
|
Loading…
Reference in New Issue
Block a user