You are not logged in.

1

Saturday, March 5th 2011, 6:12pm

copy to clipboard plugin

I needed to be able to copy a url and some embed code to the clipboard, so I wrote a tiny plugin to be able to do just that. The plugin is free and open source. The attached archive contains an xml file that shows how to use the plugin to set the contents of the clipboard:

Source code

1
<plugin name="clipboard" url="%SWFPATH%/plugins/clipboard.swf" />

Then use:

Source code

1
set(plugin[clipboard].text,"Hello World");

The clipboard is write-only (ie: you can not "paste" into krpano).

The clipboard.swf file and its sources are available as part of the krpano_fovplugins package on github.

Enjoy

This post has been edited 2 times, last edit by "ahoeben" (Mar 15th 2011, 4:55pm)


Tuur

Sage

Posts: 3,160

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Saturday, March 5th 2011, 11:31pm

Great!!

Thanx 'do

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

3

Thursday, September 8th 2011, 10:50pm

Thanks Aldo ! Very useful for me - works fine.

Phil

4

Wednesday, August 19th 2015, 11:32pm

Well, I'm, stuck. Looks to me like the code is good, but nothing gets copied into the clipboard.
Anyone have a clue for me?? Here's what I'm using...

<plugin name="clipboard" url="%SWFPATH%/plugins/clipboard.swf" />



<layer name="copy_email" url="../plugins/textfield.swf" keep="true" zorder="1000"
align="center" x="-8" y="-40"
width="140" height="24"
visible="false"
vcenter="true"
selectable="false"
background="true"
backgroundcolor="0x04367b"
borderwidth="0" roundedge="8"
alpha="1"
html="Copy Agent Email"
css="font-family:arial; font-size:12px; text-align:center; color:#dddddd; "
onclick="do_clipboard()"
/>


<action name="do_clipboard">
set(plugin[clipboard].text, "any_email");
</action>

No parsing errors. The textfield appears, but nothing gets copied.

Thank you.

v

UPDATE:
Got it to work......by putting Keep="true" in the plugin statement for clipboard.swf.
But none of the examples showed this...so I assume that the examples didn't work either.
Thanks.

This post has been edited 1 times, last edit by "VinzVideo" (Aug 20th 2015, 4:01am)


5

Saturday, August 22nd 2015, 5:05pm

Still Can't Get It To Work Right

Anyone have an idea why this only works when testing the tour.html file locally...but not on a server (either krserver, or a web server)?
I can't figure out why it works in one case, but not the other.

<plugin name="clipboard" url="../plugins/clipboard.swf" keep="true" />


<action name="email_clipboard">
set(plugin[clipboard].text, "person@rcn.com");
</action>

I tried using %SWFPATH% in the plugin path, but that didn't work either.

Of course I have an onclick event to call the action.

Thanks.

Taurus

Trainee

Posts: 134

Location: Belarus

Occupation: photographer & virtual tour developer

  • Send private message

6

Thursday, June 29th 2017, 1:23pm

Dear Aldo, do you plan to make such a plugin for HTML5?
--
in order to comply the word with the affairs, you need to keep quiet and do nothing!

Virtual tour Gomel
Virtual tour
Virtual tour
Elbrus
...

Windows 10x64 & krpano 1.19pr16

jordi

Intermediate

Posts: 464

Location: Barcelona

Occupation: creating ideas & coding them

  • Send private message

7

Thursday, June 29th 2017, 2:12pm

this could do the trick

https://clipboardjs.com/
everpano.com step beyond 360

Similar threads