<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<circle cx="100" cy="100" r="100" onclick="alert('You have clicked the circle.')" />
</svg>
Does anyone know how I can use an onClick event like this to call a tiddlywiki macro?
I tried onclick="this.wiki.setText('tiddlerName','current-item',null,'test text',null);"
But that doesn't work.... any clues?
Then for extra points... Would it be possible to call a macro with parameters? If I could do that, I could do more fancy things.
I think you should put your svg image inside a button with an ActionWidget.
See https://tiddlywiki.com/#ActionSetFieldWidget
Cheers
Sylvain
@sycom