mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-17 23:34:50 +00:00
4eed18496f
Fixes #2521
73 lines
1.7 KiB
Plaintext
73 lines
1.7 KiB
Plaintext
title: $:/core/ui/EditorToolbar/link-dropdown
|
|
|
|
\define lingo-base() $:/language/Buttons/Link/
|
|
|
|
\define link-actions()
|
|
<$action-sendmessage
|
|
$message="tm-edit-text-operation"
|
|
$param="make-link"
|
|
text={{$(linkTiddler)$}}
|
|
/>
|
|
|
|
<$action-deletetiddler
|
|
$tiddler=<<dropdown-state>>
|
|
/>
|
|
|
|
<$action-deletetiddler
|
|
$tiddler=<<searchTiddler>>
|
|
/>
|
|
|
|
<$action-deletetiddler
|
|
$tiddler=<<linkTiddler>>
|
|
/>
|
|
\end
|
|
|
|
\define external-link()
|
|
<$button class="tc-btn-invisible" style="width: auto; display: inline-block; background-colour: inherit;">
|
|
<$action-sendmessage $message="tm-edit-text-operation" $param="make-link" text={{$(searchTiddler)$}}
|
|
/>
|
|
{{$:/core/images/chevron-right}}
|
|
<$action-deletetiddler
|
|
$tiddler=<<dropdown-state>>
|
|
/>
|
|
|
|
<$action-deletetiddler
|
|
$tiddler=<<searchTiddler>>
|
|
/>
|
|
|
|
<$action-deletetiddler
|
|
$tiddler=<<linkTiddler>>
|
|
/>
|
|
</$button>
|
|
\end
|
|
|
|
|
|
\define body(config-title)
|
|
''<<lingo Hint>>''
|
|
|
|
<$vars searchTiddler="""$config-title$/search""" linkTiddler="""$config-title$/link""" linktext="" >
|
|
|
|
<$edit-text tiddler=<<searchTiddler>> type="search" tag="input" focus="true" placeholder={{$:/language/Search/Search}} default=""/>
|
|
<$reveal tag="span" state=<<searchTiddler>> type="nomatch" text="">
|
|
<<external-link>>
|
|
<$button class="tc-btn-invisible" style="width: auto; display: inline-block; background-colour: inherit;">
|
|
<$action-setfield $tiddler=<<searchTiddler>> text="" />
|
|
{{$:/core/images/close-button}}
|
|
</$button>
|
|
</$reveal>
|
|
|
|
<$reveal tag="div" state=<<searchTiddler>> type="nomatch" text="">
|
|
|
|
<$linkcatcher actions=<<link-actions>> to=<<linkTiddler>>>
|
|
|
|
{{$:/core/ui/SearchResults}}
|
|
|
|
</$linkcatcher>
|
|
|
|
</$reveal>
|
|
|
|
</$vars>
|
|
|
|
\end
|
|
|
|
<$macrocall $name="body" config-title=<<qualify "$:/state/Link/">>/> |