Hello Dave,

I think you must create a widget, that creates a button with the click event listener on it.

Or if you want it as macro you can try this with my SPilot4TW (https://www.quaraman.de/tw/pilot.html):

|\define myfunctionbutton(text:"hello world!")||
||<pilot>||
||LOOP:||
||PAUSE: Try it||
||CLS:||
||T: $text$||
||ENDLOOP:||
||</pilot>||
||\end|

|
Later in the tiddler: <<myfunctionbutton "You are great!">>
|

This wait till the user presses the "Try it" button and then prints the text.

It is using another language as Javascript, but you can do this in a normal Tiddler without creating a plugin yourself.

Am 21.03.2017 um 22:51 schrieb Dave:
Is a tutorial somewhere that would teach me how to take this javascript code

|
<!DOCTYPE html>
<html>
<body>

<p>Click the button to convert the string to lowercase letters.</p>

<buttononclick="myFunction()">Try it</button>

<pid="demo"></p>

<script>
functionmyFunction(){
varstr ="Hello World!";
varres =str.toLowerCase();
    document.getElementById("demo").innerHTML =res;
}
</script>

</body>
</html>
|

and use it in a macro?


--
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 tiddlywiki+unsubscr...@googlegroups.com <mailto:tiddlywiki+unsubscr...@googlegroups.com>. To post to this group, send email to tiddlywiki@googlegroups.com <mailto:tiddlywiki@googlegroups.com>.
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/39c1ac14-4076-4d70-80a8-e85fbb0c8efa%40googlegroups.com <https://groups.google.com/d/msgid/tiddlywiki/39c1ac14-4076-4d70-80a8-e85fbb0c8efa%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/a872b910-350c-a480-8b32-bd95119770ad%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to