|
@@ -36,6 +36,7 @@ import android.os.Build;
|
|
|
import android.os.Bundle;
|
|
|
import android.text.TextUtils;
|
|
|
import android.view.View;
|
|
|
+import android.view.KeyEvent;
|
|
|
import android.webkit.JavascriptInterface;
|
|
|
import android.webkit.ValueCallback;
|
|
|
import android.webkit.WebChromeClient;
|
|
@@ -418,6 +419,13 @@ public class RichDocumentsWebView extends ExternalSiteWebView {
|
|
|
Log_OC.e(this, "Failed to parse rename json message: " + e);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @JavascriptInterface
|
|
|
+ public void paste() {
|
|
|
+ // Javascript cannot do this by itself, so help out.
|
|
|
+ webview.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_PASTE));
|
|
|
+ webview.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_PASTE));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|