On Tuesday, November 26, 2019 at 7:39:57 AM UTC+1, James wrote:
>
> Thank you Ton.
>
> Would it be possible if we could use the java function in TW5?
>

Hi James, 

Java <https://en.wikipedia.org/wiki/Java_(programming_language)> and 
JavaScript <https://en.wikipedia.org/wiki/JavaScript> are different 
languages. In the browser we use JavaScript. 

If we would allow to include examples as shown in your link, we would 
expose our users to a security risk. For the same reason Google won't allow 
it, here in the group, to post executable examples. 

So with TW we will need a safe way to allow our users to do "crazy stuff" 
that wouldn't be allowed otherwise. We expose those functions with 
socalled: widgets and macros. 

The example Ton pointed to is using a tw macro like: 

<<copy-to-clipboard "Mary had a little lamb">>


The macro definition contains a predefined button.

A second possibility would be to use the "tm-copy-to-clipboard" tiddlywiki 
internal message. eg: 

<$button message="tm-copy-to-clipboard" param=<<now>>>
Copy date to clipboard
</$button>

Where you can define the text that will be shown. In the example above it will 
be [Copy date to clipboard] button 
and the content will be everything, that is stored as a parameter. 

There are a lot of different possibilities to assign something to a parameter 
eg: The content of an other tiddler. 

<$button message="tm-copy-to-clipboard" param={{test-tiddler}}>
Copy the content of "test-tiddler" into the clipboard
</$button>

So if you specify a bit closer, what you really need, I think we are able to 
tell you, how to do it "The TiddlyWiki Way" ;)

have fun!
mario








-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/88d765e8-6b18-4f7c-ac0a-1de701e150a5%40googlegroups.com.

Reply via email to