Procházet zdrojové kódy

Merge pull request #892 from mmeeks/webview-paste

Provide a banal 'paste' postmessage implementation.
Marino Faggiana před 5 roky
rodič
revize
442de7a4e7
1 změnil soubory, kde provedl 5 přidání a 0 odebrání
  1. 5 0
      iOSClient/Viewer/NCViewerRichdocument.swift

+ 5 - 0
iOSClient/Viewer/NCViewerRichdocument.swift

@@ -111,6 +111,11 @@ class NCViewerRichdocument: WKWebView, WKNavigationDelegate, WKScriptMessageHand
             if message.body as! String == "share" {
                 appDelegate.activeMain.openShare(with: self.detail.metadataDetail)
             }
+
+	    // Javascript cannot do this by itself, so help out.
+            if message.body as! String == "paste" {
+                self.paste(self)
+            }
         }
     }