1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

Update view toolbar "new here" button

Avoiding textual substitution fixes probems with tiddler titles containing double square brackets.
This commit is contained in:
Jermolene 2019-04-23 17:54:49 +01:00
parent 4401e71498
commit 07198b9cda

View File

@ -4,12 +4,13 @@ caption: {{$:/core/images/new-here-button}} {{$:/language/Buttons/NewHere/Captio
description: {{$:/language/Buttons/NewHere/Hint}}
\whitespace trim
\define newHereButtonTags()
[[$(currentTiddler)$]]
\define newHereActions()
<$set name="tags" filter="[<currentTiddler>]">
<$action-sendmessage $message="tm-new-tiddler" tags=<<tags>>/>
</$set>
\end
\define newHereButton()
<$button tooltip={{$:/language/Buttons/NewHere/Hint}} aria-label={{$:/language/Buttons/NewHere/Caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-new-tiddler" tags=<<newHereButtonTags>>/>
<$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>