Copy and Paste Text

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Copy and Paste Text

bilbosax
I have written a mobile real estate app that displays a lot of property
information using Spark Labels.  Unfortunately, Spark Labels are not
selectable, and a user might want to copy and paste a long MLS # or address
to Zillow, or copy the agent's phone number or email address to some other
tool.  I tried switching to RichEditableText and setting the "selectable"
property to true, but all I could do was get my text to highlight in blue,
but I had no ability to modify the amount of text that I wanted to copy and
paste, and I was given no option anywhere on the component to actually
"Copy" the text that was highlighted.
 

How can I make a text field of some sort Copyable to to the operating
system's clipboard so that I can offer users the ability to copy and paste
text on a mobile device?



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Copy and Paste Text

Erik Thomas-2
Can you use an icon that depicts copying the value of the label when tapped? LineAwesome or FontAwesome have a "copy" icon. Then programmatically place the label content on the clipboard.

On Dec 16, 2019, at 7:33 AM, bilbosax <[hidden email]> wrote:

I have written a mobile real estate app that displays a lot of property
information using Spark Labels.  Unfortunately, Spark Labels are not
selectable, and a user might want to copy and paste a long MLS # or address
to Zillow, or copy the agent's phone number or email address to some other
tool.  I tried switching to RichEditableText and setting the "selectable"
property to true, but all I could do was get my text to highlight in blue,
but I had no ability to modify the amount of text that I wanted to copy and
paste, and I was given no option anywhere on the component to actually
"Copy" the text that was highlighted.


How can I make a text field of some sort Copyable to to the operating
system's clipboard so that I can offer users the ability to copy and paste
text on a mobile device?



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
--
Message  protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.http://www.mailguard.com.au


Reply | Threaded
Open this post in threaded view
|

Re: Copy and Paste Text

bilbosax
Thanks for the reply Erik.  That is definitely an option if I just wanted to
make a few lines of text in the app copyable.  Unfortunately, I have a LOT
of fields that I think a user may want to copy and paste at some point, and
my app would be littered with icons and would look messy.  Thanks for the
thought though, as that would definitely work.

SURELY there has to be some type of text display element that is copyable
other than textInput and textArea isn't there???



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Copy and Paste Text

Alex Harui-2
What would you like the interaction to be to determine which labels are copied to the clipboard?  AFAIK, the Flex SDK doesn't have any built-in support for Copy and Paste on anything other than TextInput and TextArea.  But you can probably code up some other interaction if you want.

I've only heard of one other company that wanted to select text that wasn't in a TextArea/TextInput, and that was secondhand information from a VP, so I haven't seen many requests for Copy.

HTH,
-Alex

On 12/16/19, 3:12 PM, "bilbosax" <[hidden email]> wrote:

    Thanks for the reply Erik.  That is definitely an option if I just wanted to
    make a few lines of text in the app copyable.  Unfortunately, I have a LOT
    of fields that I think a user may want to copy and paste at some point, and
    my app would be littered with icons and would look messy.  Thanks for the
    thought though, as that would definitely work.
   
    SURELY there has to be some type of text display element that is copyable
    other than textInput and textArea isn't there???
   
   
   
    --
    Sent from: https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-flex-users.2333346.n4.nabble.com%2F&amp;data=02%7C01%7Caharui%40adobe.com%7Cf8f7149be0554f757da808d7827d5de2%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637121347277646955&amp;sdata=vb5qOJHSOZL9M7SbqZ08fo37DAynWcnY%2FrVI7JOUNyE%3D&amp;reserved=0
   

Reply | Threaded
Open this post in threaded view
|

Re: Copy and Paste Text

Erik Thomas-2
Hi Bill:

If I was doing this, I'd create a custom component with a Label and upon a tap and hold for 1 second, display a custom popup button that looks exactly like the Android or iOS "Copy" button that shows up when selecting text in native fields. The user can just tap that button to copy to clipboard.

I think discoverability will be a slight issue, but not too hard for users since to copy text in a native field, one of the gestures is to tap and hold to display the selection menu button. They may organically just try that and see the "Copy" button. Of course this approach won't allow "selecting" a sub range of the field's text, it would be all or nothing. But you can consider providing a help "overlay" for first time use and from settings that explain the shortcut to copy cell contents.

It's super easy to make a TextInput field look like a label, by setting focus, border, and background colors, but the soft keyboard cannot be prevented if editable property is true. A soft keyboard popping up when the user just wants to select text would be a bad UI design (IMO). :-)

Erik


On Dec 16, 2019, at 3:43 PM, Alex Harui <[hidden email]> wrote:

What would you like the interaction to be to determine which labels are copied to the clipboard?  AFAIK, the Flex SDK doesn't have any built-in support for Copy and Paste on anything other than TextInput and TextArea.  But you can probably code up some other interaction if you want.

I've only heard of one other company that wanted to select text that wasn't in a TextArea/TextInput, and that was secondhand information from a VP, so I haven't seen many requests for Copy.

HTH,
-Alex

On 12/16/19, 3:12 PM, "bilbosax" <[hidden email]> wrote:

   Thanks for the reply Erik.  That is definitely an option if I just wanted to
   make a few lines of text in the app copyable.  Unfortunately, I have a LOT
   of fields that I think a user may want to copy and paste at some point, and
   my app would be littered with icons and would look messy.  Thanks for the
   thought though, as that would definitely work.

   SURELY there has to be some type of text display element that is copyable
   other than textInput and textArea isn't there???



   --
   Sent from: https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-flex-users.2333346.n4.nabble.com%2F&amp;data=02%7C01%7Caharui%40adobe.com%7Cf8f7149be0554f757da808d7827d5de2%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637121347277646955&amp;sdata=vb5qOJHSOZL9M7SbqZ08fo37DAynWcnY%2FrVI7JOUNyE%3D&amp;reserved=0


--
Message  protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.http://www.mailguard.com.au


Reply | Threaded
Open this post in threaded view
|

RE: [Non-DoD Source] Copy and Paste Text

Kessler CTR Mark J-2
In reply to this post by bilbosax
    In the FlexSDK when we needed to add that functionality to a component that needed to copy to clipboard we inherited the component.  An example for one of ours is the spark DataGrid.  Our component listens for the COPY event and formats the highlighted data into an HTML based table to paste elsewhere.  This requires focus however.

    For our needs to copy from a label we used a modified spark RichEditableText where the editable property is false.  This gives the label look but allows you to highlight text and copy it out.


-Mark K

-----Original Message-----
From: bilbosax <[hidden email]>
Sent: Monday, December 16, 2019 10:34 AM
To: [hidden email]
Subject: [Non-DoD Source] Copy and Paste Text

I have written a mobile real estate app that displays a lot of property
information using Spark Labels.  Unfortunately, Spark Labels are not
selectable, and a user might want to copy and paste a long MLS # or address
to Zillow, or copy the agent's phone number or email address to some other
tool.  I tried switching to RichEditableText and setting the "selectable"
property to true, but all I could do was get my text to highlight in blue,
but I had no ability to modify the amount of text that I wanted to copy and
paste, and I was given no option anywhere on the component to actually
"Copy" the text that was highlighted.
 

How can I make a text field of some sort Copyable to to the operating
system's clipboard so that I can offer users the ability to copy and paste
text on a mobile device?



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

RE: [Non-DoD Source] Copy and Paste Text

pol2095
You can use the mx.controls.Label using and set the selectable property to
true.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

RE: [Non-DoD Source] Copy and Paste Text

bilbosax
Thanks for the reply guys, I'm sure I will find something that is satifactory
in the end.  I copy and paste things from the web and from text messages and
from Facebook and many other apps all of the time, so I just figured it
would be naturally included in most text components.  Guess not.

Erik, your thought crossed my mind as well, and is probably the approach I
will take if I get to feeling that ambitious.  I have over a hundred labels
that I would be interested in modifying, and that could entail a lot of work
that I was not prepared for.  But a copy popup would probably do the trick
just fine.

pol2095, using mx Labels popped up on my radar as well and I am interested
in seeing if that might work.  For some reason, in the mobile project that I
created, I don't seem to have access to the mx library, so I will have to
look for the way to force my mobile app to include it.  If it is anything
like RichEditableText, the result might be disappointing.  I wanted a way to
highlight the text and to have handlebars to drag and select whatever text
that you might need, like native apps do.  If mx Labels will not allow this,
I don't think it will work for me.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

RE: [Non-DoD Source] Copy and Paste Text

pol2095
This post was updated on .
I tried on Android, it's necessary to add "mx.swc", mx.controls.Label use
flash.text.TextField, it's possible to highlight, copy the text but not to
have handlebars to drag.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: [Non-DoD Source] Copy and Paste Text

Alex Harui-2
Bill,

How complex is this app?   If you port it to Royale with Cordova, you might get the selection behavior you want since it will be running using HTMLElements instead of Flash.

HTH,
-Alex

On 12/18/19, 11:50 AM, "pol2095" <[hidden email]> wrote:

    I tried in Android, it's necessary to add "mx.swc", mx.controls.Label use
    flash.text.TextField, it's possible to highlight, copy the text but not to
    have handlebars to drag.
   
   
   
    --
    Sent from: https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-flex-users.2333346.n4.nabble.com%2F&amp;data=02%7C01%7Caharui%40adobe.com%7C0edd93f206ee4097f21f08d783f38887%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637122954305116348&amp;sdata=fOZsJqunsJrI%2F4fnoUFg1Qgp0u3nM2ptHKVHZpVee5c%3D&amp;reserved=0
   

Reply | Threaded
Open this post in threaded view
|

Re: [Non-DoD Source] Copy and Paste Text

bilbosax
Alex, thanks for the thought.  This is 3 extremely large and complex apps
that I have been building for almost 3 years.  I don't think I have the
know-how to get something that large done in a reasonable amount of time.
But thanks for the idea!



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: [Non-DoD Source] Copy and Paste Text

pol2095
It's Labels with only one line ?



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: [Non-DoD Source] Copy and Paste Text

bilbosax
Most are one line Labels, a couple have multiple lines but not many



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/