Parcourir la source

Merge pull request #892 from mmeeks/webview-paste

Provide a banal 'paste' postmessage implementation.
Marino Faggiana il y a 5 ans
Parent
commit
442de7a4e7
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  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)
+            }
         }
     }