1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 02:19:55 +00:00

Better Editor Toolbar Conditions (#3180)

* The Excise tool only works with tiddlywiki5 format, so only display it on tiddlers that use the tiddlywiki5 parser.

* The Editor Height tool and stamp tool only make sense with text editors, so only display them when the content type starts with text
This commit is contained in:
Matt Lauber 2018-03-19 14:01:24 -04:00 committed by Jeremy Ruston
parent ac154e1452
commit 6963a54c66
3 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ icon: $:/core/images/fixed-height
custom-icon: yes
caption: {{$:/language/Buttons/EditorHeight/Caption}}
description: {{$:/language/Buttons/EditorHeight/Hint}}
condition: [<targetTiddler>!is[image]]
condition: [<targetTiddler>type[]] [<targetTiddler>get[type]prefix[text/]] +[first[]]
dropdown: $:/core/ui/EditorToolbar/editor-height-dropdown
<$reveal tag="span" state="$:/config/TextEditor/EditorHeight/Mode" type="match" text="fixed">

View File

@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
icon: $:/core/images/excise
caption: {{$:/language/Buttons/Excise/Caption}}
description: {{$:/language/Buttons/Excise/Hint}}
condition: [<targetTiddler>!is[image]]
condition: [<targetTiddler>type[]] [<targetTiddler>type[text/vnc.tiddlywiki]] +[first[]]
shortcuts: ((excise))
dropdown: $:/core/ui/EditorToolbar/excise-dropdown

View File

@ -3,7 +3,7 @@ tags: $:/tags/EditorToolbar
icon: $:/core/images/stamp
caption: {{$:/language/Buttons/Stamp/Caption}}
description: {{$:/language/Buttons/Stamp/Hint}}
condition: [<targetTiddler>!is[image]]
condition: [<targetTiddler>type[]] [<targetTiddler>get[type]prefix[text/]] +[first[]]
shortcuts: ((stamp))
dropdown: $:/core/ui/EditorToolbar/stamp-dropdown
text: