How to Paste by Button Click (and the new Copy, Cut and Paste events)


Guest

I have a Cordova build project with copy button and have been wonder how to make a button that would paste the copied content. Is this possible? and how do I ?

Thanks in advance.


DecSoft

Hello kasito,

If we are talking about text input controls, why not simply set the value of such controls with the copied content? Or I am completely missunderstand what you wanted?

Anyway I am update right now App Builder in order to incorporate some Clipboard related useful stuff. May this can help you in some way too? Just let me know!


2017.10 (02/05/2017)

* Add the new Clipboard2 sample, which shown how to use the recently added Copy, Cut and Paste events into almost all input controls and the Textarea control.

* Add the new [Control.PastedText] variable, which is available in almost all input controls and the Textarea control inside the Paste event of this refered controls.

* Add the Paste event to almost all input controls and the Textarea control. This event allow us to maintain informed when the user paste some text into the refered controls.

* Add the Cut event to almost all input controls and the Textarea control. This event allow us to maintain informed when the user cut some text from the refered controls.

* Add the Copy event to almost all input controls and the Textarea control. This event allow us to maintain informed when the user copy some text from the refered controls.

Please, let me know if you have any further question!



Guest

What I mean is to paste content that might be copied from a different app into my app which is build wth AB. I want users to be able to copy content from any app and paste into my app input box by a click of a button.

In summary. The app should b able to paste any value in the clpboard into an input box in my app.

Thanks.


DecSoft

Hello,

What I mean is to paste content that might be copied from a different app into my app which is build wth AB. I want users to be able to copy content from any app and paste into my app input box by a click of a button.

In summary. The app should b able to paste any value in the clpboard into an input box in my app.

Thanks.

Then I think you need a Cordova's plugin to do that, if that plugin exists... That is. The user can paste text in our application editboxes without problems, but, not by own our buttons, but using the system's provided menu. Please, if you can found a plugin that you can use, share it here with us!



Yang Ghua
What I mean is to paste content that might be copied from a different app into my app which is build wth AB. I want users to be able to copy content from any app and paste into my app input box by a click of a button.

In summary. The app should b able to paste any value in the clpboard into an input box in my app.

Thanks.

You mean you do not want to use the phone system(android or ios)'s own copy and paste,to fill the AB app?

I guess in that case,maybe the other apps should communicate with AB app with a server,would be a better way!


Guest

Hi. Reg4App

Yes. I do not want to use the phone copy and paste option or process as many are novice on how to copy and paste n android phones.

I want a system where they can copy an sms content of the phone, and while they are in my app (AB). They should just click a button to paste the content n an input box. That's all.

HOW DO I DO THIS?

Note. To copy within AB and paste witching AB is simple. He app sample has all of that. But my issue is the out of AB content to be pasted in AB with a click of a button in AB. Android app.


DecSoft

Hello to all,

Hi. Reg4App

Yes. I do not want to use the phone copy and paste option or process as many are novice on how to copy and paste n android phones.

I want a system where they can copy an sms content of the phone, and while they are in my app (AB). They should just click a button to paste the content n an input box. That's all.

HOW DO I DO THIS?

Note. To copy within AB and paste witching AB is simple. He app sample has all of that. But my issue is the out of AB content to be pasted in AB with a click of a button in AB. Android app.

In my humble opinion any Android's user knows perfectly how to paste content into an editbox. Maybe you can help a bit with an small text saying something like "To paste the number, tap in the above editbox and choose Paste from the contextual menu". In fact probably you no need to go so far: maybe a simple label or placeholder in the editbox is enough.

Anyone that can use a number in your app are perfectly capable to paste that number in the specified editbox. And, since trying to do other things implies problems (The system allow us to access the user's clipboard? With or without permissions? Is the clipboard content ready to be pasted? Is the data we expected?) I think we must think to keep simple here.

P.S. Just think on the phone application in android's devices. They have a button to paste the number into the appropiate editbox? No. Simply let the user to type the number or just paste it...

P.S.2. On the other hand, are you looking for some Cordova's plugin? Remember that, if a plugin doesn't exists, you may create your own one... or pay to some other developer to create it for you!


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.