> Basically, you'd need to detect clicks on the links, get the innerHTML
> of the clicked link and somehow save it and then display it in the
> destination tiddler.
The TWCore already assigns an 'onclick' handler to all tiddler links,
so that clicking the link actually opens the corresponding tiddler in
the story column. In order to add your desired handling, you can just
hijack the TWCore handler for tiddler links, onClickTiddlerLink(), and
add code to save the link text (in the global config.extensions
object) and then invoke the default TWCore handling to do the rest of
the processing, like this:
----------------------
window.onClickTiddlerLink_save = window.onClickTiddlerLink;
window.onClickTiddlerLink=function(ev)
{
var target=resolveTarget(ev||window.event);
config.extensions.lastClickedLinkText=target.innerHTML;
return onClickTiddlerLink_save(ev);
}
----------------------
Then, to display the most recently saved link text, you can use
something like:
<span macro="message extensions.lastClickedLinkText"></span>
in your ViewTemplate.
-e
--
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 http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.