Hi Tiziano

I made a custom button for someting like that recently. It is called a 
conditionals view template. View template means, something is shown while 
viewing a tiddler. And conditional means, when some conditions are met. 

My case: I want to copy the code of image tiddlers only (not all tiddlers). 
So the condition is: If the tiddler has a tag $:/tags/Image – you see that 
in the first filter below and you might want to delete the part 
tag[$:/tags/Image]

My solution: 
https://tid.li/tw5/apps/svg.html#%24%3A%2F_telmiger%2Fui%2FViewTemplate%2Fcopy-image-code

Code: 

<$list filter="[all[current]tag[$:/tags/Image]] 
[all[current]field:type[image/svg+xml]]">

<$button class="te-copy-code" message="tm-copy-to-clipboard" 
param={{!!text}} tooltip={{$:/language/Buttons/CopyToClipboard/Hint}} >
{{$:/core/images/copy-clipboard}} 
Copy image code to clipboard
</$button> 

''Hint: ''Remember to delete the tags `<svg ...>` and `</svg>` manually 
after pasting into the editor.

@@width:100%;
---
@@

</$list>


You might also want to delete the Hint and the horizontal ruler below that 
(I need it for my own design).

Don’t forget to tag your template tiddler with $:/tags/ViewTemplate

Good luck! 
Thomas


Am Freitag, 17. April 2020 22:58:29 UTC+2 schrieb Tiziano Solignani:
>
> Thank you. But that would make a copy of the tiddler while I meant to copy 
> the tiddler content to the system clipboard, to paste elsewhere later.
>
> Thank you. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b64ab494-4685-4e02-9d21-5db437afe9e1%40googlegroups.com.

Reply via email to