Is there any other magic? I have the javascript macro, but the variables
inside it are "invisible".
My macro:
exports.name ="makelink";
exports.run = function(clip,link) {
var ret = "[["+clip+"|"+link+"]]";
return ret ;
}
(tagged with $:/tags/tiddlyclip)
When I run it via a clip, the result is "undefined", suggesting that it
doesn't see one or more of the values that are passed.
Also, I'm looking through the code, but I can't find where linkURL and
other variables are defined. Any hints?
Thanks!
-- Mark
On Wednesday, January 17, 2018 at 11:06:18 AM UTC-8, BJ wrote:
>
>
>
> On Wednesday, January 17, 2018 at 3:54:03 PM UTC, Mark S. wrote:
>>
>> I'm attempting to use macros in tiddlyclip
>>
>> I have a macro *makelink *tagged globally with $:/tags/Macro.
>>
>> tiddlyclip macros are javascript only and are tagged with
> $:/tags/tiddlyclip
>
>> It's contents are:
>>
>> \define makelink(clip link) [[$clip$|$link$]]
>>
>> In the body column of the clip rule I have:
>>
>> \n\n((*@makelink(@text @linkURL)*))
>>
>> But when I run it, I get:
>>
>> source: invalid val @text @linkURL
>>
>> and then
>>
>> makelinkmarco not found
>>
>> The @text and @linkURL variables worked by themselves. And the makelink
>> macro works fine by itself (not called from tiddlyclip). Is there a some
>> sort of registration that has to happen for the macro to work?
>>
>> Thanks!
>> Mark
>>
>> On Tuesday, January 16, 2018 at 8:22:36 PM UTC-8, Mark S. wrote:
>>>
>>> Thanks for maintaining this code, BJ!
>>>
>>> A few comments.
>>>
>>> There seem to be a LOT of undocumented @variables.
>>>
>>> The Image and Link modes don't seem to hide/unhide the rule, but maybe
>>> I'm not using it correctly.
>>>
>>> How do I make a Link inside a rule? The "|" destroys the table
>>> formatting causing the whole rule to not be run.
>>>
>>> There is a reference to "Sections", but I only see how to identify
>>> categories. How/where are sections used?
>>>
>>> It would be handy if there was a linkTEXT (or linkText) variable so that
>>> a complete link with name could be captured
>>>
>>> Thanks!
>>> Mark
>>>
>>
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/40a45403-f3bf-4624-acbc-90002e08df2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.