Sie sind nicht angemeldet.

1

Samstag, 5. März 2011, 18:12

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:

Quellcode

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

Then use:

Quellcode

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

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »ahoeben« (15. März 2011, 16:55)


Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

3

Donnerstag, 8. September 2011, 22:50

Thanks Aldo ! Very useful for me - works fine.

Phil

4

Mittwoch, 19. August 2015, 23:32

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.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »VinzVideo« (20. August 2015, 04:01)


5

Samstag, 22. August 2015, 17:05

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

Schüler

Beiträge: 140

Wohnort: Belarus

Beruf: photographer & virtual tour developer

  • Nachricht senden

6

Donnerstag, 29. Juni 2017, 13:23

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.20

jordi

Profi

Beiträge: 583

Wohnort: Barcelona

Beruf: creating ideas & coding them

  • Nachricht senden

7

Donnerstag, 29. Juni 2017, 14:12

this could do the trick

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

8

Mittwoch, 11. Dezember 2019, 12:30

Copy to clipboard

Hi
I made a quick and dirty workaround. I edited the tour_edithelper.xml as follows. You can grab the original file here: https://krpano.com/viewsource.html?relea…_edithelper.xml
in the <action name="showspotinfos" scope="local">-section i made some vars:

Quellcode

1
calc(show_tx, roundval(caller.tx,2));calc(show_ty, roundval(caller.ty,2));calc(show_tz, roundval(caller.tz,2));calc(show_ath, roundval(caller.ath,2));calc(show_atv, roundval(caller.atv,2));


and added at the layer end a textarea as follows with an enclosing [a]-tag, so i could select and copy the text:

Quellcode

1
'[a][textarea rows="4"]name="spot '+hotspot.count+'" style="vr-spot'+overspot+'" ath="'+show_ath+'" atv="'+show_atv+'" tx="'+show_tx+'" ty="'+show_ty+'" tz="'+show_tz+'"[/textarea][/a][br]'+


Hope this helps.

Ähnliche Themen