I have this text <<list-links "[tag[fish-shell]sort[title]]>>, that I am trying to place inside copy-to-clipboard macro.
I tried following, but it didn’t work.
<<copy-to-clipboard
<<list-links "[tag[fish-shell]sort[title]]>>
>>
Then taking cue from “How to escape double quotes inside copy-to-clipboard macro?”, I tried following but it too didn’t work.
<<copy-to-clipboard """
<<list-links "[tag[fish-shell]sort[title]]>>
"""
>>
Finally I tried, following syntax which worked
<$macrocall $name="copy-to-clipboard" src="""
<<list-links "[tag[fish-shell]sort[title]]>>
"""/>
My question is, is it possible to use << angle brackets inside <<copy-to-clipboard >> syntax?
Thank you Jed.
\define edit-fields-copy-to-clipboard(fieldname)
<$set name=field-content value={{!!$fieldname$}}>
<$button class="tc-btn-invisible" message="tm-copy-to-clipboard" param=<<field-content>> tooltip="Copy fieldname $fieldname$ contents to clipboard">
<$image width="14" source="$:/PSaT/EditFields/Clipboard.png"/>
</$button>
</$set>
\end<<edit-fields-copy-to-clipboard fieldname>><$macrocall $name="edit-fields-copy-to-clipboard" fieldname="myfieldname"/>
<$macrocall $name="edit-fields-copy-to-clipboard" fieldname=<<mymacroorvariable>>/>Thank you, Tony. That’s very helpful. I am in the process of updating my macro with the help of your example.
Meanwhile, can you please explain this part
<$image width="14" source="$:/PSaT/EditFields/Clipboard.png"/>
When I use this source, I get an empty image. My list of shadown tiddlers does not have any $:/PSaT/. I have searched the docs but couldn’t find information on how to link to builtin images in TiddlyWiki.
Thank you Tony. These filtered lists are very helpful.
Your code has an orphan </$details> tag. Is it your own custom widget? Because I couldn’t find any DetailsWidget in the official documents.
Tony, I am sure you already know this, but anyone else, beginner like me, this won’t work for core images
<$image source={{!!title}} width=48></$image>
See How to use core images with ImageWidget? for details.
The final version of code that I used is
! Custom Images here
<$list filter="[is[image]]" emptyMessage="None Found">
<$image source={{!!title}} width=48 />{{!!title}}
<br/>
</$list>
! Core Images
<$list filter="[all[tiddlers+shadows]prefix[$:/core/images/]]">
{{!!text}} {{$:/core/images/blank}} {{!!title}} <br/>
</$list>
I use Markdown-Here addon for formatting posts.
Thank you Tony.
\define edit-fields-image-picker(actions,filter:"[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[!has[draft.of]sort[title]]",subfilter:"")
<div class="tc-image-chooser">
<$vars state-system=<<qualify "$:/state/editFields-image-picker">>>
<$checkbox tiddler=<<state-system>> field="text" checked="show" unchecked="hide" default="hide"> Select Image</$checkbox>
<$reveal state=<<state-system>> type="nomatch" text="hide" default="hide" tag="div"><$macrocall $name="image-picker-list" filter="""$filter$""" actions="""$actions$"""/></$reveal>
</$vars>
</div>
\end<$macrocall $name='edit-fields-image-picker' actions="<$action-setfield $field='icon' $value=<<imageTitle>>/>"/>