mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-24 00:50:28 +00:00
Add in-place editing for text-slicer plugin
@pmario \o/
This commit is contained in:
parent
fdce67399d
commit
cbbe90313b
@ -1,3 +1,3 @@
|
||||
title: $:/tags/TextSlicerToolbar
|
||||
list: $:/plugins/tiddlywiki/text-slicer/toolbar/title $:/plugins/tiddlywiki/text-slicer/toolbar/rename
|
||||
list: $:/plugins/tiddlywiki/text-slicer/toolbar/title $:/plugins/tiddlywiki/text-slicer/toolbar/rename $:/plugins/tiddlywiki/text-slicer/toolbar/edit $:/plugins/tiddlywiki/text-slicer/toolbar/cancel $:/plugins/tiddlywiki/text-slicer/toolbar/done
|
||||
|
||||
|
@ -3,4 +3,6 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/display-tiddler
|
||||
<$list filter="[<tv-show-toolbar>prefix[yes]]" variable="hasToolbar">
|
||||
{{||$:/plugins/tiddlywiki/text-slicer/templates/tiddler-toolbar}}
|
||||
</$list>
|
||||
<$list filter="[draft.of<currentTiddler>limit[1]]" editTemplate="$:/core/ui/EditTemplate" emptyMessage="""<$transclude mode='block'/>"""/>
|
||||
<$list filter="[draft.of<currentTiddler>limit[1]]" emptyMessage="""<$transclude mode='block'/>""">
|
||||
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/edit-tiddler" mode="block"/>
|
||||
</$list>
|
||||
|
11
plugins/tiddlywiki/text-slicer/template-edit-tiddler.tid
Normal file
11
plugins/tiddlywiki/text-slicer/template-edit-tiddler.tid
Normal file
@ -0,0 +1,11 @@
|
||||
title: $:/plugins/tiddlywiki/text-slicer/templates/edit-tiddler
|
||||
|
||||
<$set name="storyTiddler" value=<<currentTiddler>>>
|
||||
<$keyboard key="escape" message="tm-cancel-tiddler">
|
||||
<$keyboard key="ctrl+enter" message="tm-save-tiddler">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]] -[[$:/core/ui/EditTemplate/controls]] -[[$:/core/ui/EditTemplate/title]]" variable="listItem">
|
||||
<$transclude tiddler=<<listItem>>/>
|
||||
</$list>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
</$set>
|
13
plugins/tiddlywiki/text-slicer/toolbar-cancel.tid
Normal file
13
plugins/tiddlywiki/text-slicer/toolbar-cancel.tid
Normal file
@ -0,0 +1,13 @@
|
||||
title: $:/plugins/tiddlywiki/text-slicer/toolbar/cancel
|
||||
tags: $:/tags/TextSlicerToolbar
|
||||
|
||||
\define body()
|
||||
<$button>
|
||||
<$action-sendmessage $message="tm-cancel-tiddler" $param=<<currentTiddler>> suppressNavigation="yes"/>
|
||||
cancel
|
||||
</$button>
|
||||
\end
|
||||
|
||||
<$list filter="[draft.of<currentTiddler>limit[1]]">
|
||||
<<body>>
|
||||
</$list>
|
13
plugins/tiddlywiki/text-slicer/toolbar-done.tid
Normal file
13
plugins/tiddlywiki/text-slicer/toolbar-done.tid
Normal file
@ -0,0 +1,13 @@
|
||||
title: $:/plugins/tiddlywiki/text-slicer/toolbar/done
|
||||
tags: $:/tags/TextSlicerToolbar
|
||||
|
||||
\define body()
|
||||
<$button>
|
||||
<$action-sendmessage $message="tm-save-tiddler" $param=<<currentTiddler>> suppressNavigation="yes"/>
|
||||
done
|
||||
</$button>
|
||||
\end
|
||||
|
||||
<$list filter="[draft.of<currentTiddler>limit[1]]">
|
||||
<<body>>
|
||||
</$list>
|
12
plugins/tiddlywiki/text-slicer/toolbar-edit.tid
Normal file
12
plugins/tiddlywiki/text-slicer/toolbar-edit.tid
Normal file
@ -0,0 +1,12 @@
|
||||
title: $:/plugins/tiddlywiki/text-slicer/toolbar/edit
|
||||
tags: $:/tags/TextSlicerToolbar
|
||||
|
||||
\define body()
|
||||
<$button>
|
||||
<$action-sendmessage $message="tm-edit-tiddler" $param=<<currentTiddler>> suppressNavigation="yes"/>
|
||||
edit
|
||||
</$button>
|
||||
\end
|
||||
|
||||
<$list filter="[draft.of<currentTiddler>limit[1]]" emptyMessage="""<<body>>""">
|
||||
</$list>
|
@ -13,4 +13,5 @@ rename
|
||||
</$button>
|
||||
\end
|
||||
|
||||
<<body>>
|
||||
<$list filter="[draft.of<currentTiddler>limit[1]]" emptyMessage="""<<body>>""">
|
||||
</$list>
|
||||
|
Loading…
Reference in New Issue
Block a user