1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-30 12:00:28 +00:00
TiddlyWiki5/plugins/tiddlywiki/text-slicer/toolbar-title.tid
Jermolene bc448ce1fd Text-slicer: updates
* Add warning in document tiddler toolbar if tiddler already exists
* Live preview document in new window
* Fix slicer.js bug that was preventing the list field of headings from
being filled in correctly
* Rationalise some class names
2015-08-31 14:15:44 +01:00

31 lines
908 B
Plaintext

title: $:/plugins/tiddlywiki/text-slicer/toolbar/title
tags: $:/tags/TextSlicerToolbar
\define renameProxyTitle()
$:/config/plugins/tiddlywiki/text-slicer/rename-$(currentTiddler)$
\end
\define body()
<div class="tc-text-slicer-rename">
<$edit-text tag="input" tiddler=<<renameProxyTitle>> placeholder="Rename" default=<<currentTiddler>>/>
<$reveal type="nomatch" state="""$(renameProxyTitle)$""" text=<<currentTiddler>> default=<<currentTiddler>>>
<$button>
<$action-deletetiddler $tiddler=<<renameProxyTitle>>/>
cancel
</$button>
<$button>
<$action-sendmessage $message="tm-rename-tiddler" from=<<currentTiddler>> to={{$(renameProxyTitle)$}}/>
<$action-deletetiddler $tiddler=<<renameProxyTitle>>/>
rename
</$button>
<$set name="proxy-title" value={{$(renameProxyTitle)$}}>
<$list filter="""[<proxy-title>is[tiddler]]""">
Warning: tiddler already exists
</$list>
</$set>
</$reveal>
</div>
\end
<<body>>