1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 17:10:29 +00:00

Add in-place editing for text-slicer plugin

@pmario \o/
This commit is contained in:
Jermolene 2015-08-05 15:08:03 +01:00
parent fdce67399d
commit cbbe90313b
7 changed files with 55 additions and 3 deletions

View File

@ -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

View File

@ -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>

View 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>

View 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>

View 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>

View 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>

View File

@ -13,4 +13,5 @@ rename
</$button>
\end
<<body>>
<$list filter="[draft.of<currentTiddler>limit[1]]" emptyMessage="""<<body>>""">
</$list>