1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-30 13:29:56 +00:00
TiddlyWiki5/core/ui/EditorToolbar/excise-dropdown.tid
Cameron Fischer c5ea6628f5
Trim Saga: Control panel and Editor Toolbar (#6600)
Shout out to the TiddlySpot tiddler macro for being completely broken, but also being completely unused, so no one noticed.
2022-04-06 08:27:05 +01:00

51 lines
1.5 KiB
Plaintext

title: $:/core/ui/EditorToolbar/excise-dropdown
\define lingo-base() $:/language/Buttons/Excise/
\define body(config-title)
\whitespace trim
''<<lingo Hint>>''
<<lingo Caption/NewTitle>>&#32;<$edit-text tag="input" tiddler="$config-title$/new-title" default="" focus="true"/>
<$set name="new-title" value={{$config-title$/new-title}}>
<$list filter="""[<new-title>is[tiddler]]""">
<div class="tc-error">
<<lingo Caption/TiddlerExists>>
</div>
</$list>
</$set>
<$checkbox tiddler="""$config-title$/tagnew""" field="text" checked="yes" unchecked="no" default="false">&#32;<<lingo Caption/Tag>></$checkbox>
<<lingo Caption/Replace>>&#32;<$select tiddler="""$config-title$/type""" default="transclude">
<option value="link"><<lingo Caption/Replace/Link>></option>
<option value="transclude"><<lingo Caption/Replace/Transclusion>></option>
<option value="macro"><<lingo Caption/Replace/Macro>></option>
</$select>
<$reveal state="""$config-title$/type""" type="match" text="macro">
<<lingo Caption/MacroName>>&#32;<$edit-text tag="input" tiddler="""$config-title$/macro-title""" default="translink"/>
</$reveal>
<$button>
<$action-sendmessage
$message="tm-edit-text-operation"
$param="excise"
title={{$config-title$/new-title}}
type={{$config-title$/type}}
macro={{$config-title$/macro-title}}
tagnew={{$config-title$/tagnew}}
/>
<$action-deletetiddler
$tiddler="$config-title$/new-title"
/>
<$action-deletetiddler
$tiddler=<<dropdown-state>>
/>
<<lingo Caption/Excise>>
</$button>
\end
<$macrocall $name="body" config-title=<<qualify "$:/state/Excise/">>/>