androidwebviewcontextual-action-barricheditabletext

How to implement your own SelectAll,Cut,Copy,Paste in Webview


I'm implementing Rich Edit Text using WebView,Buttons for editor actions are displayed in contextual action bar(CAB),on long press on of webview it's default CAB is shown button,I understood Webview doesn't provide any provision to customize it's CAB.

So I think it's better to implement Select, Cut, Copy, Paste action. I already tried this But not worked for me.

My Application is targeting android 3.x+ devices.

Please suggest me to how to do that.


Solution

  • I used BTAndroidWebViewSelection javascript library to do that.For Cut, Copy and Paste action I injected my own JavaScripts.

    Thanks.