1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-16 14:54:51 +00:00
TiddlyWiki5/core/ui/ViewToolbar/new-here.tid
Jermolene 07198b9cda Update view toolbar "new here" button
Avoiding textual substitution fixes probems with tiddler titles containing double square brackets.
2019-04-23 17:54:49 +01:00

24 lines
838 B
Plaintext

title: $:/core/ui/Buttons/new-here
tags: $:/tags/ViewToolbar
caption: {{$:/core/images/new-here-button}} {{$:/language/Buttons/NewHere/Caption}}
description: {{$:/language/Buttons/NewHere/Hint}}
\whitespace trim
\define newHereActions()
<$set name="tags" filter="[<currentTiddler>]">
<$action-sendmessage $message="tm-new-tiddler" tags=<<tags>>/>
</$set>
\end
\define newHereButton()
<$button actions=<<newHereActions>> tooltip={{$:/language/Buttons/NewHere/Hint}} aria-label={{$:/language/Buttons/NewHere/Caption}} class=<<tv-config-toolbar-class>>>
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/new-here-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/NewHere/Caption}}/>
</span>
</$list>
</$button>
\end
<<newHereButton>>