send wikify results to another widget (clipboard button)

67 views
Skip to first unread message

Dave

unread,
Nov 17, 2018, 12:56:39 AM11/17/18
to TiddlyWiki
Hi, I'm trying to get two things that work to "combine":

this is a wikify widget that works (Thanks Mark S.)
<$wikify text="<<get-wikified-counts2>> +[!nsort[]limit[5]]" name="filter-counts"><$list filter=<<filter-counts>> variable="count-indications"><<count-indications>><br/></$list></$wikify>

it gives one or more lines of text

and this puts something on the clipboard:
<$button message="tm-copy-to-clipboard" param="some text">
to clipboard
</$button>

I want to be able to put the wikify results in another program via the clipboard,
but when I put the first as a param of the second it doesn't work, and I've tried it with triple quotes, and """{{{ brackets,

and I set it as a macro like this:
\define mylist2()

"""{{{<$wikify text="<<get-wikified-counts2>> +[!nsort[]limit[5]]" name="filter-counts"><$list filter=<<filter-counts>> variable="count-indications"><<count-indications>><br/></$list></$wikify>}}}"""

\end

which works in the normal tiddler as <<mylist2>>
but when I put it as <<mylist2>> and "<<mylist2>>" as the param in the button widget that didn't work either.

Then I thought maybe the button should be within the wikify widget, but the button widget should kind of be where the list widget is, so, I'm not sure where to go with it next.

Any suggestions?




TonyM

unread,
Nov 17, 2018, 3:35:21 AM11/17/18
to TiddlyWiki
Dave,

I am not sure what the """{{{ and its closure is for. Perhaps remove them, perhaps also remove The blank lines in the definition, what is the result then?

You macro should only return the output of the list widget.

Regards
Tony

Dave

unread,
Nov 17, 2018, 11:53:36 AM11/17/18
to TiddlyWiki
When I do that all I get is the text of the wikify widget itself, not the output

Dave

unread,
Nov 17, 2018, 11:54:50 AM11/17/18
to TiddlyWiki
I.e. in the clipboard

Dave

unread,
Nov 17, 2018, 12:08:38 PM11/17/18
to TiddlyWiki
I suppose another way might be too get the wikify output into a field and somehow get the field content into the clipboard, but I don't know how to do that either :'(

Mark S.

unread,
Nov 17, 2018, 12:36:25 PM11/17/18
to TiddlyWiki
It would take too long to set up the experimental environment.

What I would start by trying is, like Tony mentioned, removing the triple brackets and quotes.Then wikify mylist2 and inside the wikify tabs pass the result to the button param. e.g.

<$wikify text=<<mylist2>> name="wikidcounts">
<$button message=tm-copy-to-clipboard param=<<wikidcounts>>>Button</button>
</$wikify>

Good luck!
-- Mark

Dave

unread,
Nov 17, 2018, 2:09:47 PM11/17/18
to TiddlyWiki
That's brilliant - I never thought of wikifying the other wikify macro. So new rule: if something renders unwikified unexpectedly, just re-wikify it.

It works, thank you

One tiny thing... When I do that the <br/> between the lines that print out are lost. Do you know of any tricks to retain that in the clipboard?

Reply all
Reply to author
Forward
0 new messages