I have done the same as Thomas for a search feature for TW system icons-- first one copies the icon tiddler title, the second copies the tiddler content. Below them is notes on the variations of the copy to clipboard feature. Everything is also included in tid files that can be imported into a TW to experiment with or use as reference.
Search for system icons, copy of title:<br/>
<$edit-text tiddler='$:/temp/sysiconssearch' field='searchterm' placeholder='search term' tag='input' type='text'/><$button class="tc-btn-rounded" style="margin-left:10px;">
<$action-setfield $tiddler="$:/temp/sysiconssearch" searchterm="" />
{{$:/core/images/close-button}}
</$button><br/>
<$reveal type='nomatch' state='$:/temp/sysiconssearch!!searchterm' text=''>
<$set name='searchterm' value={{$:/temp/sysiconssearch!!searchterm}}>
<ol>
<$list filter="[all[tiddlers+shadows]tag[$:/tags/Image]prefix[$:/core]search:title<searchterm>]">
<li><div style="margin-bottom:5px; padding:5px 10px; border:solid 1px;"><$transclude/> ^^---^^ <$link><$view field="title"/></$link> <$macrocall $name="copy-to-clipboard" src=<<currentTiddler>>/></div></li>
</$list></ol>
</$set>
</$reveal>
Search for system icons, copy of tiddler content:<br/>
<$edit-text tiddler='$:/temp/sysiconssearch' field='searchterm' placeholder='search term' tag='input' type='text'/><$button class="tc-btn-rounded" style="margin-left:10px;">
<$action-setfield $tiddler="$:/temp/sysiconssearch" searchterm="" />
{{$:/core/images/close-button}}
</$button><br/>
<$reveal type='nomatch' state='$:/temp/sysiconssearch!!searchterm' text=''>
<$set name='searchterm' value={{$:/temp/sysiconssearch!!searchterm}}>
<ol>
<$list filter="[all[tiddlers+shadows]tag[$:/tags/Image]prefix[$:/core]search:title<searchterm>]">
<li><div style="margin-bottom:5px; padding:5px 10px; border:solid 1px;"><$transclude/> ^^---^^ <$link><$view field="title"/></$link> <$macrocall $name="copy-to-clipboard" src={{!!text}}/></div></li>
</$list></ol>
</$set>
</$reveal>
Copy to clipboard variantations
// copy-to-clipboard cannot handle backticks
https://groups.google.com/d/topic/tiddlywiki/4EPOIsVDfVY/discussion //
`<<copy-to-clipboard """text to be copied""">>`
§ __simple macro__ //( doesn't have closing / )//:
`<<copy-to-clipboard "tlext to be copied">>` -- <<copy-to-clipboard "text to be copied" class="tc-btn-boxed">>
§ __macrocall (for lists)__:
* copies title:
`<$macrocall $name="copy-to-clipboard" src=<<currentTiddler>> class="tc-btn-rounded"/>` -- <$macrocall $name="copy-to-clipboard" src=<<currentTiddler>> class="tc-btn-rounded"/>
* copies text field:
`<$macrocall $name="copy-to-clipboard" src={!!text}} class="tc-btn-rounded"/>` -- <$macrocall $name="copy-to-clipboard" src={{!!text}} class="tc-btn-rounded"/>
§ __button w/ "tm-copy-to-clipboard" action message__:
* w/ macro or custom macro w/ multi-lined text to be copied:
`<$button message="tm-copy-to-clipboard" param=<<now>>>Copy date to clipboard</$button>` -- -- <$button message="tm-copy-to-clipboard" param=<<now>>>Copy date to clipboard</$button>
* w/ text field copy :
`<$button message="tm-copy-to-clipboard" param={{!!text}}>Copy to clipboard</$button>` -- -- <$button message="tm-copy-to-clipboard" param={{!!text}}>Copy to clipboard</$button>