Skip to main content
Known Participant
February 7, 2013
Answered

Copying Clipboard on iOs

  • February 7, 2013
  • 10 replies
  • 3160 views

It used to be that you could not copy the clipboard in an AIR app on an iOs device.

Is this still the case?

This topic has been closed for replies.
Correct answer pranjain

Did a quick search, maybe this?

http://circlecube.com/2008/11/copy-textfield-text-to-system-clipboard-actionscript-as2-as3-tutorial/


Hi,

You can use the below mentioned Clipboard API method to set the same data to clipboard as of textfield:

Clipboard.generalClipboard.setData(ClipboardFormats.TEXT_FORMAT, TextField.text);

Thanks,

Pranali

10 replies

Mark.fromOP
Inspiring
February 8, 2013

Just opened one of my apps where I have a simple textbox that a user can edit and it had preset text in it, clicked it, the iOS keyboard came up, held down over the text and the native options came up, hit copy, closed app and opened safari, hit the search box and held until native options came up, hit paste and voila text from the app, so I would say it is not true and you CAN copy to clipboard from simple textboxes in an AIR app.

Hope that helps.

DachFlachAuthor
Known Participant
February 8, 2013

Thanks Mark, however, it is that I cannot by command or function that a textField be copied to the clipBoard.

I should have been more clear.

What I want to achieve is:

Set the clipBoard contents to be that of a specific text\field.

Is there a way to duplicate that which you just experienced in order to copy the contents of a textField to the clipBoard with only the press of a button?

Mark.fromOP
Inspiring
February 8, 2013