You need to be logged in to post in the forums. If you do not have an account, please sign up first.

15. February 2012, 21:22:57

kunFoo

Posts: 96

Set clipboard data?

Hello,

is there any way to implement the 'clipboardData.setData' function available for Internet Explorer?

This function would allow Opera extension users to have text automatically set in clipboard (without clicking Crtl+C).

Thanks (:



16. February 2012, 10:11:41

Mintsoft

Posts: 54

Hiya,

Originally posted by kunFoo:

is there any way to implement the 'clipboardData.setData' function available for Internet Explorer?



Not by default, you can use a flash object (for example zeroclipboard) to emulate the behaviour but there is no direct javascript to clipboard access.

Thanks
-Rob
Presto/2.10.289 Opera 12.00 on Windows 7 Professional 64Bit

16. February 2012, 12:38:35

kunFoo

Posts: 96

Ok Mintsoft. Thanks (:

9. July 2012, 15:13:16

kunFoo

Posts: 96

Hello again bigsmile

In 12.50 build description the following is announced.

Originally posted by "Opera Desktop Team":

Clipboard API exposes the following new events: copy, cut, and paste; for text/plain and text/html content.


Unfortunaltey, in the error console I still get the following error:
Cannot convert 'window.clipboardData' to object

When invoking:
window.clipboardData.setData("Text",myText);

Any clue? right

10. July 2012, 07:59:03

Opera Software

peroo

Posts: 18

window.clipboardData is part of Internet Explorer's old clipboard API, and not supported by Opera. Opera's implementation is based on the new W3C Clipboard API, and is quite different.

10. July 2012, 12:33:27

kunFoo

Posts: 96

Ok peroo smile

Originally posted by peroo:

window.clipboardData is part of Internet Explorer's old clipboard API, and not supported by Opera. Opera's implementation is based on the new W3C Clipboard API, and is quite different.


Is there any example available? Reading the standard I'm not able to find the equivalent Opera method to Explorer's window.clipboardData

Thanks bigsmile

11. July 2012, 09:25:42

Opera Software

peroo

Posts: 18

Originally posted by kunFoo:

Ok peroo smile

Originally posted by peroo:

window.clipboardData is part of Internet Explorer's old clipboard API, and not supported by Opera. Opera's implementation is based on the new W3C Clipboard API, and is quite different.


Is there any example available? Reading the standard I'm not able to find the equivalent Opera method to Explorer's window.clipboardData

Thanks bigsmile


I've been unable to find any examples, but after reading the spec closer it seems it's not possible to use the API to interact directly with the system clipboard. The API can only be used to intercept and transform user-initiated copy/cut/paste events.

11. July 2012, 13:18:05

kunFoo

Posts: 96

Ok peroo. Thanks again wink

11. July 2012, 13:47:48

Internet Explorer's clipboardData.setData() != W3C's setData() ???
Windows 7 SP1 x86 edition and Windows XP Service Pack 3.
If you need any help from me with regards to Opera, please make a comment on any of my blog posts.
Support Opera wishes

Forums » Dev.Opera » Opera Extensions Development Discussions