mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-06-25 23:03:15 +00:00
add new-tiddler new-journal new-image keyboard shortcuts (#3512)
* add new-tiddler action tiddler * use new-tiddler action-tiddler * use new-tiddler action-tiddler correctly * use new-journal action-tiddler * create new-journal action-tiddler * use new-image action-tiddler * add new-image action-tiddler * create new-image type config users may prefer png over jpeg for example * add new-tiddler keyboard shortcut * add keyboard shortcut configs * add keyboard shortcuts ShortcutInfo * add new-journal Keyboard shortcut * add new-image keyboard shortcut * Create Hidden Setting NewImageType.tid
This commit is contained in:
parent
6c9dfd7f62
commit
9f8a74c6d9
10
core/ui/Actions/new-image.tid
Normal file
10
core/ui/Actions/new-image.tid
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
title: $:/core/ui/Actions/new-image
|
||||||
|
tags: $:/tags/Actions
|
||||||
|
description: create a new image tiddler
|
||||||
|
|
||||||
|
\define get-type()
|
||||||
|
image/$(imageType)$
|
||||||
|
\end
|
||||||
|
<$vars imageType={{$:/config/NewImageType}}>
|
||||||
|
<$action-sendmessage $message="tm-new-tiddler" type=<<get-type>>/>
|
||||||
|
</$vars>
|
14
core/ui/Actions/new-journal.tid
Normal file
14
core/ui/Actions/new-journal.tid
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
title: $:/core/ui/Actions/new-journal
|
||||||
|
tags: $:/tags/Actions
|
||||||
|
description: create a new journal tiddler
|
||||||
|
|
||||||
|
<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} journalTags={{$:/config/NewJournal/Tags}} journalText={{$:/config/NewJournal/Text}}>
|
||||||
|
<$wikify name="journalTitle" text="""<$macrocall $name="now" format=<<journalTitleTemplate>>/>""">
|
||||||
|
<$reveal type="nomatch" state=<<journalTitle>> text="">
|
||||||
|
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<journalTags>> text={{{ [<journalTitle>get[]] }}}/>
|
||||||
|
</$reveal>
|
||||||
|
<$reveal type="match" state=<<journalTitle>> text="">
|
||||||
|
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<journalTags>> text=<<journalText>>/>
|
||||||
|
</$reveal>
|
||||||
|
</$wikify>
|
||||||
|
</$vars>
|
5
core/ui/Actions/new-tiddler.tid
Normal file
5
core/ui/Actions/new-tiddler.tid
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
title: $:/core/ui/Actions/new-tiddler
|
||||||
|
tags: $:/tags/Actions
|
||||||
|
description: create a new empty tiddler
|
||||||
|
|
||||||
|
<$action-sendmessage $message="tm-new-tiddler"/>
|
7
core/ui/KeyboardShortcuts/new-image.tid
Normal file
7
core/ui/KeyboardShortcuts/new-image.tid
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
title: $:/core/ui/KeyboardShortcuts/new-image
|
||||||
|
tags: $:/tags/KeyboardShortcut
|
||||||
|
key: ((new-image))
|
||||||
|
|
||||||
|
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
|
||||||
|
{{$:/core/ui/Actions/new-image}}
|
||||||
|
</$navigator>
|
7
core/ui/KeyboardShortcuts/new-journal.tid
Normal file
7
core/ui/KeyboardShortcuts/new-journal.tid
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
title: $:/core/ui/KeyboardShortcuts/new-journal
|
||||||
|
tags: $:/tags/KeyboardShortcut
|
||||||
|
key: ((new-journal))
|
||||||
|
|
||||||
|
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
|
||||||
|
{{$:/core/ui/Actions/new-journal}}
|
||||||
|
</$navigator>
|
7
core/ui/KeyboardShortcuts/new-tiddler.tid
Normal file
7
core/ui/KeyboardShortcuts/new-tiddler.tid
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
title: $:/core/ui/KeyboardShortcuts/new-tiddler
|
||||||
|
tags: $:/tags/KeyboardShortcut
|
||||||
|
key: ((new-tiddler))
|
||||||
|
|
||||||
|
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
|
||||||
|
{{$:/core/ui/Actions/new-tiddler}}
|
||||||
|
</$navigator>
|
|
@ -3,8 +3,7 @@ tags: $:/tags/PageControls
|
||||||
caption: {{$:/core/images/new-image-button}} {{$:/language/Buttons/NewImage/Caption}}
|
caption: {{$:/core/images/new-image-button}} {{$:/language/Buttons/NewImage/Caption}}
|
||||||
description: {{$:/language/Buttons/NewImage/Hint}}
|
description: {{$:/language/Buttons/NewImage/Hint}}
|
||||||
|
|
||||||
<$button tooltip={{$:/language/Buttons/NewImage/Hint}} aria-label={{$:/language/Buttons/NewImage/Caption}} class=<<tv-config-toolbar-class>>>
|
<$button tooltip={{$:/language/Buttons/NewImage/Hint}} aria-label={{$:/language/Buttons/NewImage/Caption}} class=<<tv-config-toolbar-class>> actions={{$:/core/ui/actions/new-image}}>
|
||||||
<$action-sendmessage $message="tm-new-tiddler" type="image/jpeg"/>
|
|
||||||
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
|
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
|
||||||
{{$:/core/images/new-image-button}}
|
{{$:/core/images/new-image-button}}
|
||||||
</$list>
|
</$list>
|
||||||
|
|
|
@ -3,19 +3,8 @@ tags: $:/tags/PageControls
|
||||||
caption: {{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournal/Caption}}
|
caption: {{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournal/Caption}}
|
||||||
description: {{$:/language/Buttons/NewJournal/Hint}}
|
description: {{$:/language/Buttons/NewJournal/Hint}}
|
||||||
|
|
||||||
\define journalActions()
|
|
||||||
<$wikify name="journalTitle" text="""<$macrocall $name="now" format=<<journalTitleTemplate>>/>""">
|
|
||||||
<$reveal type="nomatch" state=<<journalTitle>> text="">
|
|
||||||
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<journalTags>> text={{{ [<journalTitle>get[]] }}}/>
|
|
||||||
</$reveal>
|
|
||||||
<$reveal type="match" state=<<journalTitle>> text="">
|
|
||||||
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<journalTags>> text=<<journalText>>/>
|
|
||||||
</$reveal>
|
|
||||||
</$wikify>
|
|
||||||
\end
|
|
||||||
|
|
||||||
\define journalButton()
|
\define journalButton()
|
||||||
<$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<<tv-config-toolbar-class>> actions=<<journalActions>>>
|
<$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<<tv-config-toolbar-class>> actions={{$:/core/ui/Actions/new-journal}}>
|
||||||
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
|
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
|
||||||
{{$:/core/images/new-journal-button}}
|
{{$:/core/images/new-journal-button}}
|
||||||
</$list>
|
</$list>
|
||||||
|
@ -24,8 +13,4 @@ description: {{$:/language/Buttons/NewJournal/Hint}}
|
||||||
</$list>
|
</$list>
|
||||||
</$button>
|
</$button>
|
||||||
\end
|
\end
|
||||||
<$set name="journalTitleTemplate" value={{$:/config/NewJournal/Title}}>
|
|
||||||
<$set name="journalTags" value={{$:/config/NewJournal/Tags}}>
|
|
||||||
<$set name="journalText" value={{$:/config/NewJournal/Text}}>
|
|
||||||
<<journalButton>>
|
<<journalButton>>
|
||||||
</$set></$set></$set>
|
|
|
@ -3,11 +3,11 @@ tags: $:/tags/PageControls
|
||||||
caption: {{$:/core/images/new-button}} {{$:/language/Buttons/NewTiddler/Caption}}
|
caption: {{$:/core/images/new-button}} {{$:/language/Buttons/NewTiddler/Caption}}
|
||||||
description: {{$:/language/Buttons/NewTiddler/Hint}}
|
description: {{$:/language/Buttons/NewTiddler/Hint}}
|
||||||
|
|
||||||
<$button message="tm-new-tiddler" tooltip={{$:/language/Buttons/NewTiddler/Hint}} aria-label={{$:/language/Buttons/NewTiddler/Caption}} class=<<tv-config-toolbar-class>>>
|
<$button actions={{$:/core/ui/Actions/new-tiddler}} tooltip={{$:/language/Buttons/NewTiddler/Hint}} aria-label={{$:/language/Buttons/NewTiddler/Caption}} class=<<tv-config-toolbar-class>>>
|
||||||
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
|
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
|
||||||
{{$:/core/images/new-button}}
|
{{$:/core/images/new-button}}
|
||||||
</$list>
|
</$list>
|
||||||
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
|
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
|
||||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/NewTiddler/Caption}}/></span>
|
<span class="tc-btn-text"><$text text={{$:/language/Buttons/NewTiddler/Caption}}/></span>
|
||||||
</$list>
|
</$list>
|
||||||
</$button>
|
</$button>
|
||||||
|
|
3
core/wiki/config/NewImageType.tid
Normal file
3
core/wiki/config/NewImageType.tid
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
title: $:/config/NewImageType
|
||||||
|
|
||||||
|
jpeg
|
|
@ -15,6 +15,9 @@ list-bullet: {{$:/language/Buttons/ListBullet/Hint}}
|
||||||
list-number: {{$:/language/Buttons/ListNumber/Hint}}
|
list-number: {{$:/language/Buttons/ListNumber/Hint}}
|
||||||
mono-block: {{$:/language/Buttons/MonoBlock/Hint}}
|
mono-block: {{$:/language/Buttons/MonoBlock/Hint}}
|
||||||
mono-line: {{$:/language/Buttons/MonoLine/Hint}}
|
mono-line: {{$:/language/Buttons/MonoLine/Hint}}
|
||||||
|
new-image: {{$:/language/Buttons/NewImage/Hint}}
|
||||||
|
new-journal: {{$:/language/Buttons/NewJournal/Hint}}
|
||||||
|
new-tiddler: {{$:/language/Buttons/NewTiddler/Hint}}
|
||||||
picture: {{$:/language/Buttons/Picture/Hint}}
|
picture: {{$:/language/Buttons/Picture/Hint}}
|
||||||
preview: {{$:/language/Buttons/Preview/Hint}}
|
preview: {{$:/language/Buttons/Preview/Hint}}
|
||||||
quote: {{$:/language/Buttons/Quote/Hint}}
|
quote: {{$:/language/Buttons/Quote/Hint}}
|
||||||
|
|
|
@ -14,6 +14,9 @@ list-bullet: ctrl-shift-L
|
||||||
list-number: ctrl-shift-N
|
list-number: ctrl-shift-N
|
||||||
mono-block: ctrl-shift-M
|
mono-block: ctrl-shift-M
|
||||||
mono-line: ctrl-M
|
mono-line: ctrl-M
|
||||||
|
new-image: alt-I
|
||||||
|
new-journal: alt-J
|
||||||
|
new-tiddler: alt-N
|
||||||
picture: ctrl-shift-I
|
picture: ctrl-shift-I
|
||||||
preview: alt-P
|
preview: alt-P
|
||||||
quote: ctrl-Q
|
quote: ctrl-Q
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
title: Hidden Setting: New-Image Type
|
||||||
|
tags: [[Hidden Setting]]
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
By default new images are created with the image-type `jpeg`
|
||||||
|
|
||||||
|
The hidden setting in $:/config/NewImageType can be set to another Image-Type which is used for new Image Tiddlers, like `png`
|
Loading…
Reference in New Issue
Block a user