I am using ionic and cordova to build a hybrid application.
However, I can't copy text from any of my webviews. From my Android phone or from the browser, copying text does not work. Selecting text and dragging the pointer does nothing.
This occurs for instance with the basic app generated by ionic start myApp tabs
.
Simply put, how can I allow users to copy-paste?
Make ion-content
to overflow-scroll="true"
and add a class to your copyable text
.selectable{
-webkit-user-select: auto;
}
You cannot copy anything to clipboard from javascript for now programmatically. However it can be done from native side via plugin CordovaClipboard
You can try with console.log() and copy/paste from the console.
Or if you need to copy from an emulator you can use Remote debugging