Skip to content

Commit

Permalink
Paste working
Browse files Browse the repository at this point in the history
  • Loading branch information
zetxek committed Nov 17, 2024
1 parent 0a98b8e commit c17e2eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TranslateWebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ class TranslateWebView: WKWebView {
if let copiedString = pasteboard.string(forType: .string) {
// Use the copied string
print("Pasted: \(copiedString)")
pasteboard.
}
let javascript = "document.execCommand('insertText', false, '\(copiedString)');"
self.evaluateJavaScript(javascript, completionHandler: nil) }
}


Expand Down

0 comments on commit c17e2eb

Please sign in to comment.