Pasting text into a webview
<p>in the default android browser, when you long-press on a textbox inside of a webpage you get a context menu showing several options, such as the ability to paste text into the textbox. How do I replicate this functionality with my own webview?</p>

<p>I looked in the android source code, specifically the code that handles context menu creation and found this:</p>

<pre><code>     @Override
     public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {

         ...

         WebView.HitTestResult result = webview.getHitTestResult();
         int type = result.getType();
         if (type == WebView.HitTestResult.EDIT_TEXT_TYPE) {
             // let TextView handles context menu
             return;
         }

         ...

    }
</code></pre>

<p>What the code means is that when the user long-presses on a "EDIT_TEXT_TYPE" ie. a textbox, the webview does nothing. Some magical "TextView" handles the context menu. Now I'm lost, how do I get this context menu to appear in my webview?</p>
