[tw5] Re: How to Create a Button to Copy the Text to Clipboard?

2019-11-26 Thread PMario
uups,

Forgot the links to the TW docs 

.

-m

-- 
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/bdf96cc0-8279-4277-a5f0-b5a303d9472c%40googlegroups.com.


[tw5] Re: How to Create a Button to Copy the Text to Clipboard?

2019-11-26 Thread PMario
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  and 
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: 

<>


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=<>>
Copy date to clipboard


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


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.


[tw5] Re: How to Create a Button to Copy the Text to Clipboard?

2019-11-26 Thread TonyM
You would need to write a plugin to include JavaScript unless it can be placed 
in a bookmarklet (unlikely).

But widgets should be sufficient for what you asked for.

regards
Tony

-- 
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/33f9878b-b3d7-451d-8188-7bd864e562ab%40googlegroups.com.


[tw5] Re: How to Create a Button to Copy the Text to Clipboard?

2019-11-25 Thread James
Thank you Ton.

Would it be possible if we could use the java function in TW5?


On Monday, 25 November 2019 18:42:13 UTC+8, Ton Gerner wrote:
>
> Hi James,
>
> Have a look at https://tiddlywiki.com/#copy-to-clipboard%20Macro
>
> Cheers,
>
> Ton
>
>

-- 
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/1e2ebfed-7321-4c62-b7ee-6986a01e8904%40googlegroups.com.


[tw5] Re: How to Create a Button to Copy the Text to Clipboard?

2019-11-25 Thread Ton Gerner
Hi James,

Have a look at https://tiddlywiki.com/#copy-to-clipboard%20Macro

Cheers,

Ton

-- 
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/f9b09a53-01d9-4c0e-847e-f547f895e8e2%40googlegroups.com.